Ubuntu 16.04
Docker version 17.09.0-ce, build afdb6d4
docker-compose version 1.8.0
Tried re-installing docker-ce with apt-get purge --auto-remove. No luck. Restarting docker service with sudo service docker restart works but stopping the service every time I have to use the docker-compose down command is not a fix.
So even when I create a container outside docker-compose and try to stop or kill it it results in the same error. Meaning I can not stop or kill any container.
Using docker inspect I found the PID the container was using. Killing this process as root using kill -9 did not work. Eventually I started consulting the docker service and found the line below in the results of the dmesg command:
After using the below commands I was able to use docker-compose stop again.
Moderator notice
Several people complained that the following removed many more applications than they wanted. Do not execute the command if you don’t know what it will do, and always read all follow up posts.
sudo apt-get purge --auto-remove apparmor
sudo service docker restart docker system prune --all --volumes
Works like a charm! I even created account, to reply that this answer is working. The day will come when we all be celebrating jsloan117’s Day every year!