Compose: CoreOS: containers not restarting after reboot

Created on 30 Mar 2016  路  5Comments  路  Source: docker/compose

Hello,

I am using Docker Compose 1.5.2 on CoreOS stable (835.13.0), and 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.

I installed compose by using this method:

curl -L https://github.com/docker/compose/releases/download/1.5.2/run.sh > /opt/bin/docker-compose
chmod +x /opt/bin/docker-compose

It sounds similar to this issue, but not exactly the same. Any ideas?

kinquestion

Most helpful comment

Hello,

This was indeed a configuration change within CoreOS. For the benefit of others, the solution was to enable the Docker service in systemd:

systemctl enable docker.service
systemctl start docker.service

All 5 comments

As mentioned in that issue (https://github.com/docker/compose/issues/872#issuecomment-137819288) once compose starts the containers it isn't involved in the restart process so the issue is very likely with docker engine, or possibly how coreos is managing it.

So does this issue belong under the docker project? It seems more docker-compose specific.

This sounds more like an issue with CoreOS to me. It's definitely not an issue with Compose, because Compose is not involved in the restart process.

Ok, I may need to reach out to that community. One thing to note: Compose is actually running as a Docker container on CoreOS. As far as I knew, Docker containers should automatically start on CoreOS, which is why I thought it might be a Compose issue.

Hello,

This was indeed a configuration change within CoreOS. For the benefit of others, the solution was to enable the Docker service in systemd:

systemctl enable docker.service
systemctl start docker.service
Was this page helpful?
0 / 5 - 0 ratings