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
Leave a Reply