How to stop running Container, if error response from daemon is: Cannot Kill Container [...] permission denied?
I solved it but I am not sure why. I think I solved it by restarting the VM and restart docker with these commands
Flush changes: $ sudo systemctl daemon-reload
Restart Docker: $ sudo systemctl restart docker
Use trick:
sudo killall docker-containerd-shim
to free the docker
from stopped container stuck like this
Have you tried docker stop <container-id>
or docker kill <container-id>
?
Note: Use docker ps -a
to get container IDs
Also, are you using sudo
or logged as root
?