Docker container startup

Docker

Setup auto startup

1
2
3
4
5
6
7
8
# --restart=always Docker will restart it
docker run --restart=always CONTAINER_ID

# update exisit container
docker update --restart=always CONTAINER_ID
docker update --restart=no CONTAINER_ID

# ps: --restart=always cannot use --rm

Reference

https://docs.docker.com/engine/reference/commandline/run/#options
https://github.com/moby/moby/blob/v1.11.2/docs/reference/commandline/update.md#update-a-containers-restart-policy