Restart Mode

In this lesson, you will be introduced to the restart mode which ensures that containers are always running until explicitly told not to.

When creating a container, you have the choice to set a restart mode. It tells Docker what to do when a container stops. A restart mode is set with the --restart switch.

When running server containers like we did earlier, we want them to always be up. It is very tempting to use the always restart mode. For instance:

Get hands-on with 1000+ tech skills courses.