skip to Main Content

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

2

Answers


  1. Chosen as BEST ANSWER

    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


  2. Answering as I understand the question,

    By looking at your error I think you don’t have permission to run docker commands.

    So,

    1. Add user user account to that group
      • sudo usermod -aG docker $USER
    2. Change the current real group ID
      • sudo newgrp docker

    after that try to run your commands again.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search