--live-restore
flag of the dockerd
command. Using --live-restore
allows you to keep your containers runningduring a Docker upgrade, though networking and user input are interrupted.--restart
flagwhen using the docker run
command. The value of the --restart
flag can beany of the following:Flag | Description |
---|---|
no | Do not automatically restart the container. (the default) |
on-failure | Restart the container if it exits due to an error, which manifests as a non-zero exit code. |
always | Always restart the container if it stops. If it is manually stopped, it is restarted only when Docker daemon restarts or the container itself is manually restarted. (See the second bullet listed in restart policy details) |
unless-stopped | Similar to always , except that when the container is stopped (manually or otherwise), it is not restarted even after Docker daemon restarts. |
redis
.docker start
or docker service
command you would normally use tostart the container manually. Consult the documentation for the specificprocess manager for more details.