Docker provides restart policies to control whether your containers start automatically when they exit, or when Docker restarts. Restart policies start linked containers in the correct order. Docker recommends that you use restart policies, and avoid using process managers to start containers.
Restart policies are different from the –live-restore flag of the dockerd command. Using –live-restore lets you to keep your containers running during a Docker upgrade, though networking and user input are interrupted.
The following command starts a Redis container and configures it to always restart, unless the container is explicitly stopped, or the daemon restarts.