Restart the docker service and apply the self start stop command of recommendation
- 2021-07-18 09:26:07
- OfStack
Let's take a look at the restart docker service application self-start-stop command, which is as follows:
# Restart docker Service application, not automatically opened docker Container
docker update --restart=no (docker Container CONTAINER ID Or docekr Container NAMES)
# Restart docker Service application, automatically opened docker Container
docker update --restart=always (docker Container CONTAINER ID Or docekr Container NAMES)
ps: Start the Docker command after the server restarts
Startup steps:
1. Start the Docker daemon
systemctl daemon-reload
2. Docker startup command:
systemctl start docker
3. Check whether the docker service is started
ps -ef |grep docker
4. View the services started by docker:
docker ps
Others:
Restart the docker service
systemctl restart docker
Stop the docker service
systemctl stop docker
Summarize
Above is this site to introduce the restart of docker service application start-stop command, I hope to help you, if you have any questions welcome to leave me a message, this site will reply to you in time!