9

I started couchbase community with docker as following:

docker run -e CB_RAMSIZE=256 -e "CB_ADMIN_PWD=123456" --name couchbase-community -p 8091-8094:8091-8094 -p 11210:11210 crobin/couchbase-community

I'm now trying to stop it with

docker stop couchbase-community
docker kill couchbase-community
docker kill -s 9 couchbase-community

Nothing stops it.

It's just stuck alive. Anyway for me to stop that container?!

the result of docker ps -a

docker ps -a
CONTAINER ID        IMAGE                        COMMAND                  CREATED             STATUS                  PORTS                                                                                               NAMES
9deed40a7db9        crobin/couchbase-community   "bash /bin/start-cb.…"   32 hours ago        Up 32 hours (healthy)   0.0.0.0:8091-8094->8091-8094/tcp, 11207/tcp, 11211/tcp, 0.0.0.0:11210->11210/tcp, 18091-18094/tcp   couchbase-community
7b265619e593        nginx                        "--name nginx"           8 weeks ago         Created                 80/tcp                                                                                              laughing_brahmagupta
65f7ebdf03ba        nginx                        "1000"                   8 weeks ago         Created                 80/tcp                                                                                              lucid_heyrovsky
e402edffeeaa        db148b62d457                 "tini -- start-noteb…"   2 months ago        Created                                                                                                                     admiring_brattain
60e58a104b52        db148b62d457                 "tini -- start-noteb…"   2 months ago        Created                                                                                                                     eloquent_elion
a668f900566e        db148b62d457                 "tini -- start-noteb…"   2 months ago        Created                                                                                                                     unruffled_poitras
6fe2e4bd18bc        jupyterhub/jupyterhub        "--generate-config"      2 months ago        Created                 8000/tcp

docker and OS version

docker Version 17.12.0-ce-mac55 (23011) on macbook 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64

enter image description here

mohan08p
  • 5,002
  • 1
  • 28
  • 36
Jas
  • 14,493
  • 27
  • 97
  • 148
  • 1
    What docker version do you use? I don't see any problem to stop above container on ubuntu 16.04 with docker version `17.12.1-ce`. – nickgryg Mar 16 '18 at 11:36
  • 1
    Would you please post the information you see when you use `docker ps -a`? – Matthew Groves Mar 16 '18 at 13:50
  • @Nickolay docker Version 17.12.0-ce-mac55 (23011) on macbook 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64 – Jas Mar 16 '18 at 17:35
  • @MatthewGroves adding the result of ps -a to the question – Jas Mar 16 '18 at 17:37
  • 1
    what about `docker stop 9deed40a7db9`? – meatspace Mar 16 '18 at 17:59
  • @meatspace still stuck uploaded moving gif of it to the question. – Jas Mar 17 '18 at 06:25
  • 1
    Try `sudo docker update --restart=no couchbase-community` then `docker stop couchbase-community` – Rafaf Tahsin Mar 18 '18 at 09:35
  • 1
    @Jas let me know if `sudo docker update --restart=no couchbase-community` and `docker stop couchbase-community` worked. – Rafaf Tahsin Mar 20 '18 at 05:55
  • @200OK I tried the above both `sudo docker update --restart=no couchbase-community` and `docker stop couchbase-community` and are stuck. – Jas Mar 20 '18 at 08:14
  • is it possible to kill the process directly without docker? – Jas Mar 21 '18 at 13:49
  • tbh the way this image is handling exit signals is hacky, not sure why the script needs to be so complex (see [here](https://github.com/christopherobin/docker-couchbase/blob/master/setup.sh)). Its not docker, its the image – stacksonstacks Mar 24 '18 at 20:25

1 Answers1

3

This looks like your docker daemon is stuck or this specific container/something broke it.

Firstly if you restart your docker demon/Docker for Mac (using its panel) container will be stopped regardless, as engine that runs on it will go down.

Then either, if you do not care about it's data stored in volume you can just remove it via docker rm -f 9deed40a7db9 , or just restart it.

I would reccomend doing docker system prune && docker volume prune if you do not care about volumes/unused images/containers you have on your machine and to check what image you using does in its Dockerfile and what volumes it introduces to the docker engine.

BlackStork
  • 7,603
  • 1
  • 16
  • 18
  • thanks, restarting docker daemon/docker for mac did the trick, wasn't aware of `prune` options, looks interesting, any best practices for using it would be appreciated. – Jas Mar 25 '18 at 09:33