docker
runtime
ai_generated
true
Error response from daemon: cannot stop container: permission denied
ID: docker/cannot-stop-container
90%Fix Rate
92%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 24 | active | — | — | — |
Root Cause
Docker cannot stop a container, often due to a zombie process or AppArmor/SELinux restriction.
genericWorkarounds
-
90% success Try docker kill <container> for a SIGKILL instead of SIGTERM
docker stop sends SIGTERM; docker kill sends SIGKILL
-
85% success Check AppArmor/SELinux: dmesg | grep -i deny for policy blocks
SELinux or AppArmor may prevent container signal delivery
Dead Ends
Common approaches that don't work:
-
Using kill -9 on the container PID from the host
60% fail
May leave Docker's state inconsistent; container appears running
-
Rebooting the host
85% fail
Disruptive to all running containers and services
Error Chain
Frequently confused with: