Docker Restart policies
Hello DevOps/DevSecOps team, welcome back for another intresting post on Docker. In this post we will be discussing and experiment on "docker restart policies". What is Docker restart policies? Docker provides restart policies to control whether your containers start automatically when they exit, or when Docker daemon restarts. A Docker container’s status can be controlled by providing the restart policy while the container is instantiated with docker run sub command. Docker container restart policies Docker restart policies are there to keep containers active(Up status) in all possible downfalls, we can leverage it in multiple ways as an example if we have a Tomcat/Nginx web server running on a container and have to keep it Up and running even on bad request we can use restart policy with a flag, it will keep the server "Up" and running till we stopped it manually. Syntax : docker run --restart [policy-type] IMAGE [COMMAND] [ARG...] Below are t...