How to stop a container using ssh connection?

2019-08-16 17:22发布

I have this error when I try to stop a container with sudo docker stop pg:

Error response from daemon: cannot stop container: pg: Cannot kill container 9cead43f288336d418e91105d5c9a4e0858794c96ebd167e5e92784d8ed1eab2: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"

标签: docker
1条回答
SAY GOODBYE
2楼-- · 2019-08-16 17:53

It seems that apparmor it's blocking the access, you can try stop it and try again to stop the container:

sudo systemctl stop apparmor && systemctl disable apparmor
sudo docker stop pg

And then run it again with the flag:

--security-opt apparmor=unconfined
查看更多
登录 后发表回答