restart-policies

Restart policies in a Docker container

Reading Time: 3 minutes To enable self-healing in a docker container, we can use restart policies in docker. There are three restart policies: on failure: It restarts the docker container if the container exits because of some failure or exits with a non-zero exit code. It will also restart the container when the Docker daemon restarts even if the containers were in a stopped state. always: It will always Continue Reading