Docker关闭容器自启动
时间: 2023-10-17 22:55:16 浏览: 178
Docker容器内应用服务自启动的方法示例
要关闭Docker容器的自启动,可以使用以下命令:docker update --restart=no 容器名称。这将禁止指定容器在Docker守护程序启动时自动重启。如果你想要查看容器的当前自启动配置状态,可以使用docker inspect 容器名称 | grep "RestartPolicy" -A 3命令。\[2\]
#### 引用[.reference_title]
- *1* [Docker服务以及容器设置自动启动](https://blog.csdn.net/chinese_zhang/article/details/126400049)[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/lsy9202C/article/details/127025817)[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 ]
阅读全文