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 container exit causes other docker containers to also stop #1283

Closed
ezyk opened this issue Apr 12, 2015 · 4 comments
Closed

Docker container exit causes other docker containers to also stop #1283

ezyk opened this issue Apr 12, 2015 · 4 comments

Comments

@ezyk
Copy link

ezyk commented Apr 12, 2015

I have 2 docker containers, Jenkins master and Jenkins slave. I am using docker compose to start them

docker-compose up master worker

When the worker container stops either because the slave Jenkins crashed or because i manually stopped the container, the master also stops which is really unexpected with the following message( with --verbose flag) :

docker wait -> 137
eeadockerjenkins_worker_1 exited with code 137
Gracefully stopping... (press Ctrl+C again to force)
docker containers <- (all=False)
docker containers -> (list with 2 items)
docker containers <- (all=False)
docker containers -> (list with 2 items)
Stopping eeadockerjenkins_master_1...
docker stop <- (u'013f5f6dec6a4d8d5c828fe05f762cff3802eb2c85827e6e7afb4d791905a78b')
docker wait <- (u'013f5f6dec6a4d8d5c828fe05f762cff3802eb2c85827e6e7afb4d791905a78b')
docker stop -> None
docker wait -> 143

If i start my container in detached mode using:

docker-compose up -d master worker

it's working fine, the master keeps running after the worker has stopped (or crashed). Any ideas why this is happening? Is this an expected behavior?

docker --version: Docker version 1.5.0, build a8a31ef/1.5.0
docker-compose --version: dockerdocker-compose 1.1.0
@andreyvital
Copy link

Interesting.

@dnephin
Copy link

dnephin commented Apr 17, 2015

Related #741, use -d to fix this behaviour

@ezyk
Copy link
Author

ezyk commented Apr 17, 2015

@dnephin Thanks for the response.

@dnephin
Copy link

dnephin commented Apr 17, 2015

Going to close this issue, let's continue the discussion in #741

@dnephin dnephin closed this as completed Apr 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants