What is the purpose of the –restart policy in Docker and what options are available?

Docker Fundamentals Medium

Docker Fundamentals — Medium

What is the purpose of the –restart policy in Docker and what options are available?

Key points

  • The --restart policy determines the automatic restart behavior of Docker containers.
  • Options like on-failure and always dictate when the container should be restarted.
  • Understanding the --restart policy is crucial for managing container availability.

Ready to go further?

Related questions