Self-Healing Containers with Restart Policies

Learn how to use the container restart policies to ensure the smooth functioning of containers.

It’s often a good idea to run containers with a restart policy. This is a form of self-healing that enables Docker to automatically restart them after certain events or failures have occurred.

Restart policies are applied per container and can be configured imperatively on the command line as part of docker-container run commands or declaratively in YAML files for use with higher-level tools, such as Docker Swarm, Docker Compose, and Kubernetes.

Get hands-on with 1200+ tech skills courses.