How to Start Docker Containers Automatically After a Host Reboot?

Опубликовано: 14 Ноябрь 2024
на канале: Bobby Iliev
19,046
227

Recently one of my servers crashed and after the reboot, none of my Docker containers started.

So I had to manually check each container and start the ones that were required.

That is when I realized that I should implement a restart policy to control whether a container starts automatically or not.

This is a quick demo on how to set up a Docker Restart Policy so that your containers restart automatically.

Docker Documentation: https://docs.docker.com/config/contai...

I use DigitalOcean for all of my demos, you can use the link below to get a free $100 credit and spin up your own Linux servers!

https://m.do.co/c/2a9bba940f39

Website: https://bobbyiliev.com
Twitter:   / bobbyiliev_