What are restart policies?

docker restart policies dictate how a container should behave when it is shutted down by some factor.

There are four restart-policies:

  • No - Never restart when stopped by some means
  • Always - Always restart no matter how it is stopped
  • On-Failure - Restart only when the container stops with an erroneous code
  • Unless-Stopped - Restart always unless stopped manually with a KILL or STOP

Docker Posted May 17, 2020

You can now show your support. 😊

We use cookies to provide you with a great user experience, analyze traffic and serve targeted promotions.   Learn More   Accept