docker 启动 镜像
时间: 2023-09-23 17:05:44 浏览: 102
要启动一个Docker镜像,你可以使用以下命令:
```
docker run -it --env-file ./run/hrms.env -v /opt/hrms/hrms/hrms:/opt/hrms/hrms -p 10.142.8.12:8083:8080 55ad68601db
```
这个命令使用了`-it`参数表示以交互式终端运行,`--env-file`参数指定了环境变量文件的路径,`-v`参数指定了容器内外的文件映射,`-p`参数指定了端口映射。最后的`55ad68601db`是要启动的镜像的ID或名称。\[2\]
#### 引用[.reference_title]
- *1* [【docker基础操作命令】(一)启动命令和镜像命令](https://blog.csdn.net/weixin_43598687/article/details/124637938)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [Docker 启动镜像的方法](https://blog.csdn.net/bocai_xiaodaidai/article/details/92969756)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [Docker镜像及容器基本操作命令](https://blog.csdn.net/m0_62948770/article/details/127342544)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文