Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker.containers fails to correctly start and manage containers (Start/Stop loop) #82

Closed
timwhite opened this issue May 15, 2016 · 1 comment

Comments

@timwhite
Copy link

I believe we are hitting the issue with systemd managing the client, not containers. http://container-solutions.com/running-docker-containers-with-systemd/
The main docker issue is moby/moby#6791
A possible solution is https://github.com/ibuildthecloud/systemd-docker

OS: Debian Jessie
Docker version 1.11.1, build 5604cbe

Basically, https://github.com/saltstack-formulas/docker-formula/blob/master/docker/files/systemd.conf#L22 starts with ExecStart=/usr/bin/docker run -d which tells docker to start the container in the background and then exit. So the docker client does that. Systemd thinks that docker "crashed" so tries to restart it (after running the ExecStop commands that pull down the running container). And the cycle starts again until the retry limit.

Removing the -d works, as then the client doesn't exit once the container has started, but as others have pointed out in the above links, this means systemd is managing the client, not the container, and in some situations this will cause a correctly running container to be restarted.

@tiadobatima
Copy link
Contributor

I created #87 to address this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants