0

I am using docker version Docker version 18.09.0, build 4d60db4 in a Ubuntu 16.04 system. I am unable to stop a docker container. My docker image contains a spring boot application. I am using the following command to stop the container:

sudo docker stop 0c6b70fcb25e

And I am getting the following error:

Error response from daemon: cannot stop container: 0c6b70fcb25e: 
Cannot kill container 0c6b70fcb25e0b0c55f123853654cd2611e3702fdf5622bd07e12a92efa3df46: 
unknown error after kill: runc did not terminate sucessfully:
container_linux.go:393: signaling init process caused "permission denied": unknown

I have tried running docker stop with and without sudo.

Sunil
  • 429
  • 1
  • 9
  • 25

2 Answers2

0

Try this:

docker kill --signal=SIGHUP my_container

You can find more information here.

Also, if you are on Linux, AppArmor may prevent stopping the containers. Disable AppArmor temporarily and try to stop the container again. For configuring the AppArmor check this link.

nPcomp
  • 8,637
  • 2
  • 54
  • 49
0

Follow this link. docker on ubuntu 16.04 error when killing container

I used the following commands and it worked.

sudo killall docker-containerd-shim

sudo docker-compose down
Adds
  • 601
  • 2
  • 12
  • 24