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

Restarting containers cannot be removed by docker-compose kill, rm, stop #4570

Closed
alberto56 opened this issue Mar 3, 2017 · 3 comments
Closed

Comments

@alberto56
Copy link

Containers stuck in "restarting mode" sometimes cannot be stopped

$ docker-compose ps
           Name                         Command                 State      Ports 
--------------------------------------------------------------------------------
dcyclemetrics_drupal_run_2   docker-php-entrypoint /bin ...   Restarting         
dcyclemetrics_drupal_run_3   docker-php-entrypoint /bin ...   Restarting         
dcyclemetrics_drupal_run_4   docker-php-entrypoint /bin ...   Restarting         
dcyclemetrics_drupal_run_5   docker-php-entrypoint /bin ...   Restarting         
dcyclemetrics_drupal_run_6   docker-php-entrypoint /bin ...   Restarting         
dcyclemetrics_drupal_run_7   docker-php-entrypoint /bin ...   Restarting         
$ docker-compose stop
$ docker-compose kill
$ docker-compose rm -f
No stopped containers
$ docker-compose ps
           Name                         Command                 State      Ports 
--------------------------------------------------------------------------------
dcyclemetrics_drupal_run_2   docker-php-entrypoint /bin ...   Restarting         
dcyclemetrics_drupal_run_3   docker-php-entrypoint /bin ...   Restarting         
dcyclemetrics_drupal_run_4   docker-php-entrypoint /bin ...   Restarting         
dcyclemetrics_drupal_run_5   docker-php-entrypoint /bin ...   Restarting         
dcyclemetrics_drupal_run_6   docker-php-entrypoint /bin ...   Restarting         
dcyclemetrics_drupal_run_7   docker-php-entrypoint /bin ...   Restarting         

I need to pass the container ids to "docker kill", I am expecting docker-compose to be able to kill these containers without using this:

$ docker-compose ps -q|xargs docker kill
b06bf13e282d5c39de4b2039b48a9a1324f35041e4c8af14d1032f2b02d1f735
ee0fc4877cb07626e424d0c1b6abf7499be8129de6af7a2839e821b09c04bd20
c19b4a8afd169637094f0bf41641580c278f51979bab3a485f067a7ac86f4d3f
5646de010ab2333eb08d10630a53635d64797ed8c958a0490e64227a20617e38
ab4066bd1d5dfb0700b571a1501e9b3bc11d332ca6f3d63f7bfd4cf2c178f176
$ docker-compose ps
Name   Command   State   Ports 
------------------------------
$ 
@shin-
Copy link

shin- commented Mar 3, 2017

Have you tried docker-compose down?

@alberto56
Copy link
Author

Thanks @shin, I think that was what I was looking for! I can't confirm it now because I can't reproduce the situation. I'll close this nonetheless as that is the probable solution.

@Mazuh
Copy link

Mazuh commented Jan 11, 2018

I reproduced the situation and docker-compose down solved.

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