docker怎么设置开机不要启动

设置docker开机不要启动的方法:1、利用“systemctl list-unit-files | grep enable”查看docker服务器以及容器是否设置了开机启动;2、利用“systemctl disable docker.service”关闭开机启动即可。

docker怎么设置开机不要启动

本教程操作环境:linux7.3系统、docker19.03版、Dell G3电脑。

docker怎么设置开机不要启动

查看已启动的服务

systemctl list-units --type=service

1、查看是否设置开机启动

systemctl list-unit-files | grep enable

设置开机启动

systemctl enable docker.service

2、关闭开机启动

systemctl disable docker.service

扩展知识

docker容器设置自动启动

启动时加--restart=always

23.png

如果已经过运行的项目

如果已经启动的项目,则使用update更新:

docker update --restart=always isaler_v0.0.11

推荐学习:《docker视频教程》

以上就是docker怎么设置开机不要启动的详细内容,更多请关注https://www.sxiaw.com/其它相关文章!