Docker is not automaticly restaring containers on reboot. [Ubuntu 14.04]

I’m running distribution Ubuntu 14.04, and my previously running docker containers is not starting up automaticly after reboot.

I think the problem started happening after I replaced the package in the ubuntu repositories with lxc-docker-1.2.0 package from ppa.

The docker deamon itself is starting fine, and also containers start with the command: docker start .

I don’t got deb diff installed, but are there any configuration differences between and lxc-docker?

Link to /etc/default/docker
Link to /etc/init/docker.conf

Thanks in advance.

When you launched it did you specify a restart policy?

@oppsig, @sam is pointing you to :smile:

Ok maybe I misunderstood, but isn’t it default docker behaviour to start previously running containers that were running when you did a shutdown on your computer?

I didnt supply any --restart flag when i created the containers.

It switch back on forth on this one, at the moment, you need to be explicit.

OK, that could explain why it worked when i used docker around version 0.9 but no longer at version 1.2+.

Anyway, i tried like you suggested to set --restart=“always” flag on all my containers and now it works perfectly.
They start when i start my computer. So i guess the logic is now that as long as docker starts, the containers should also start.
I had to do it this way because using the default upstart script was unreliable, sometimes the containers would start sometimes not.

Thanks for all the help :smile: