I run:
- docker: Docker version 17.03.0-ce, build 60ccb22
- linux: Ubuntu 16.04.2 LTS
Image inside docker container runs some golang app, which (I found this know) wasn't properly dealing with errors. I should include os.Exit(1) for cases like mine, for error checking.
I run/start docker container with command like
docker run -it --restart=always --env-file ~/PRODUCTION/services/resolvment_api/.environmet_variables -p 8081:3003 --name resolvment_2 -d resolvment-api
Ok, then it looks like an error occur inside a docker container on app level. At this point something strange happens to docker/docker container.
If i do docker ps
I can see
2e7b02258647 resolvment-api "/bin/sh -c $GOBIN..." 9 days ago Up 37 hours 0.0.0.0:8081->3003/tcp resolvment_2
I can do
docker logs 2e7b02258647
and will see logs.If I try to do
docker stop 2e7b02258647
I get container id in next line as usually when you successfully stop a container. Then if i dodocker ps
again... I can still see docker container (with same id) listed there?!If I then try to forcefully remove the container with
docker rm -f 2e7b02258647
I get an errorError response from daemon: Unable to remove filesystem for 2e7b02258647ec357fd1beb0083ad678eb381474f1315b3e524d318472c5f061: remove /var/lib/docker/containers/2e7b02258647ec357fd1beb0083ad678eb381474f1315b3e524d318472c5f061/shm: device or resource busy
but docker container is not listed anymore underdocker ps
.Then I want to add/start again the container with command
docker run -it --restart=always --env-file ~/PRODUCTION/services/resolvment_api/.enviroment_variables -p 8081:3003 --name resolvment_2 -d resolvment-api
and the error that i get as response is this: fc174f65cc34a2573563729acfe11436370ab08965be553e682d82e7af06b236
docker: Error response from daemon: service endpoint with name resolvment_2 already exists.
so i do docker rm resolvment_2
, and try to start again... but same error.
if i put -f with rm command... doesn't help either.
So, rm/run/rm/run.... walking in circle... doesn't help.
And I can't just restart docker daemon, since there are few other containers running.
Would really aprechiate some help on this.
Best, Tomaz