Close

Delete Collection?

Are you sure you want to delete this collection permanently?

Close

Delete Collection?

Are you sure you want to delete this collection permanently?

Everyone has a Story to Tell and an Experience to Share!

Let’s Start Writing
7d2ae450-b338-4010-b67f-e22727d82cc6

158 views

Troubles in killing Container or Image in Docker system?

Learn something inserting features in docker.

A few days ago I start learning docker based system for Django app. 

#

first, I start with the configuration, successfully configured and my app Django app has been started,but when I stop the service using Ctrl+C, almost my mission had been completed but .......

its not completed.

Problem was that many Docker container not stopped. 

i failed there. i start scrolling and research, I get many solutions for the same.

but sometimes they are working, sometimes not.

I tried to stop, kill the container/image by following commands.

docker container kill [container_id]

docker stop [container_id]

docker-compose down

sudo kill -9 [docker_server_id]

These are not wrong but something left at the time of configuration might be.

Then I get a code which brings me out from that problem.

sudo aa-remove-unknown 

I run the command and I try to kill/stop the docker container and it is working.

really it's magic for me.

aa-remove-unknown will inventory all profiles in /etc/apparmor.d/, compare that list to the profiles currently loaded into the kernel, and then remove all of the loaded profiles that were not found in /etc/apparmor.d/. It will also report the name of each profile that it removes on standard out.

#

#what_I_learned

Python Developer | CN Researcher | Data Scientist

Reference Image
Close