Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing a Docker container without using aa-remove-unknown command

I'm trying to stop the docker container, but I can't because permission is denied

Error response from daemon: cannot stop container: : permission denied

I found the "aa-remove-unknown" command, but I don't think it suits me. Is it possible to stop the container without this command and without restarting Linux?

For the container, I added the configuration "--privileged".

I will appreciate any hint. Thanks.

like image 678
Fleeploed Avatar asked Aug 24 '26 06:08

Fleeploed


1 Answers

I agree that using aa-remove-unknown is undesirable (in fact I consider it to be very bad advice).

If you are considering using aa-remove-unknown then run sudo aa-remove-unknown -n. In my case on Ubuntu 23.10 I get quite a big list!

Instead, to temporarily get around the issue, you can do:

sudo service apparmor stop
docker-compose down
sudo service apparmor start
like image 174
NealeU Avatar answered Aug 26 '26 07:08

NealeU



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!