Ensuring Uptime docker

Ensuring Uptime docker 1

1)Stopping container  On Fail

docker run -d --name abc678 ubuntu:latest

2)Restart on fail

when our container fails due to an error it should be automatically restarted

docker run -d --name abc123 --restart=on-failure:3 ubuntu:latest

3)Always restart

docker run -d --name acd1234 --restart=always ubuntu:latest

4)View status of the container

docker logs <nameofconatiner>

Default image
Vishal Devxo
Vishal Devxo is a DevOps engineer and a Backend developer, he spends all his time for creating good tutorials with better visuals and blogging, developed some projects based on Python-Django, some hacking modules and scripts in python