Ensuring Uptime docker

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>