update_docker_restart_policy
The following command starts a Redis container and configures it to always restart, unless the container is explicitly stopped, or the daemon restarts.
docker run -d --restart unless-stopped redis
The following command changes the restart policy for an already running container named redis.
docker update --restart unless-stopped redis
The following command ensures all running containers restart.
docker update --restart unless-stopped $(docker ps -q)
Ref: https://docs.docker.com/engine/containers/start-containers-automatically/
update_docker_restart_policy.txt · Last modified: 2025/07/02 22:55 by oso
