Docker container start on boot
To set a docker container to start on system reboot, run
1 |
docker update --restart=unless-stopped CONTAINER_ID |
Replace CONTAINER_ID with actual ID of your container.
You can specify
1 |
--restart=unless-stopped |
On creating docker container, for example
1 |
docker run -d -p 80:80 --restart=unless-stopped nginx |