i am new use with docker, and I can't delete active containers, and I can't stop containers
using docker rm -v -f $(docker ps -qa)
AND docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q)
and continuos error: Error response from daemon: cannot stop container: beef39...: permission denied
or rror response from daemon: Could not kill running container 16c..., cannot remove - permission denied
full container's enter image description here
CodePudding user response:
Answering as I understand the question,
By looking at your error I think you don't have permission to run docker commands.
So,
- Create a user group by,
sudo groupadd docker
- Add user user account to that group
sudo usermod -aG docker $USER
- Change the current real group ID
sudo newgrp docker
after that try to run your commands again.
CodePudding user response:
I managed to solve this problem as follows!
execute: sudo aa-remove-unknown
and run standard docker commands to stop and then kill the container
he will clean the apparmor in linux, it's a bug with apparmor and blocks actions that shut down created dockers