Docker Compose not starting upon reboot

384 views
Skip to first unread message

Andy

unread,
Apr 6, 2016, 10:54:15 PM4/6/16
to CoreOS User
Hello,

I am managing my containers with Docker Compose.  I have installed it in CoreOS using:

curl -L https://github.com/docker/compose/releases/download/1.5.2/run.sh > /opt/bin/docker-compose
chmod +x /opt/bin/docker-compose
I notice that if I have restart: always in my docker-compose.yml file, the containers don't start automatically upon reboot.


However, as soon as I login and issue a docker command (such as docker ps or even docker version) the containers start up as expected. It's like I have to call docker once before compose kicks in.  Any ideas?

Docker compose folks seem to think it's CoreOS related - https://github.com/docker/compose/issues/3241


Alex Crawford

unread,
Apr 7, 2016, 2:23:27 AM4/7/16
to Andy, CoreOS User
On 04/06, Andy wrote:
> However, as soon as I login and issue a docker command (such as docker ps or
> even docker version) the containers start up as expected. It's like I have
> to call docker once before compose kicks in. Any ideas?

docker.service is socket-activated on CoreOS. Unless the service is enabled or
activated by other service, systemd will not start the service. You just need to
enable docker.service to get the behavior you are looking for.

-Alex
signature.asc

Andy

unread,
Apr 7, 2016, 10:13:18 AM4/7/16
to CoreOS User, andy...@gmail.com
Thanks a bunch.  This seemed to solve it.

systemctl enable docker.service
systemctl start docker.service
Reply all
Reply to author
Forward
0 new messages