Home > Operation and Maintenance > Docker > How to set docker not to start when booting

How to set docker not to start when booting

WBOY
Release: 2022-07-22 16:05:49
Original
7944 people have browsed it

How to set docker not to start at startup: 1. Use "systemctl list-unit-files | grep enable" to check whether the docker server and container are set to start at startup; 2. Use "systemctl disable docker.service" to shut down Just boot up and start.

How to set docker not to start when booting

The operating environment of this tutorial: linux7.3 system, docker version 19.03, Dell G3 computer.

How to set docker not to start at boot

View started services

systemctl list-units --type=service
Copy after login

1. Check whether it is set to start at boot

systemctl list-unit-files | grep enable
Copy after login

Set up startup

systemctl enable docker.service
Copy after login

2. Turn off startup

systemctl disable docker.service
Copy after login

Expand knowledge

docker container settings auto-start

Add --restart=always when starting

How to set docker not to start when booting

If the running project has already been started

If it has already been started For projects, use update to update:

docker update --restart=always isaler_v0.0.11
Copy after login

Recommended learning: "docker video tutorial"

The above is the detailed content of How to set docker not to start when booting. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template