How to Restart Docker Containers Automatically After a Server Reboot
For the relevant scenarios, see the official Docker guide Use the docker update command
docker update --restart=always container
To check whether the setting took effect, use the docker inspect command
docker inpsect --format='{{.HostConfig.RestartPolicy.Name}}' container
You can also specify the policy when you first create the Docker container; see the docker run command
JackSparrow414 Original post This post is licensed under CC BY-NC-SA 4.0