Docker container start on boot

To set a docker container to start on system reboot, run

docker update --restart=unless-stopped CONTAINER_ID

Replace CONTAINER_ID with actual ID of your container.

You can specify

--restart=unless-stopped

On creating docker container, for example

docker run -d -p 80:80 --restart=unless-stopped nginx

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *