...

/

Self-Healing Containers with Restart Policies

Self-Healing Containers with Restart Policies

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

Container restart policies are a simple form of self-healing that allows the local Docker Engine to automatically restart failed containers.

Restart policies

We apply restart policies per container, and Docker supports the following four policies:

  • no (default)
  • on-failure
  • always
  • unless-stopped

The following table shows how each policy reacts to different scenarios. A “Y” indicates the policy will attempt a ...

Access this course and 1400+ top-rated courses and projects.