I have two containers, the first is redis and the second is my application that has a -link for the redis container. They both restart policies :
docker run --restart=on-failure:10 --name redis redis docker run --restart=on-failure:10 --name app --link redis app
Then when I sudo service docker stop and then sudo service docker start only the redis container starts. BTW, if there is no link in the application container, it also starts.
My version of Docker is 1.7.1.
vagrant@vagrant-ubuntu-trusty-64 :~$ docker version Client version: 1.7.1 Client API version: 1.19 Go version (client): go1.4.2 Git commit (client): 786b29d OS/Arch (client): linux/amd64 Server version: 1.7.1 Server API version: 1.19 Go version (server): go1.4.2 Git commit (server): 786b29d OS/Arch (server): linux/amd64
source share