docker kill: Force-Stop Containers with a Signal
Stop a container immediately by sending it a signal.
docker kill sends a signal (SIGKILL by default) to the main process of a container with no grace period. This page covers custom signals and when to prefer it over docker stop.
What it does
docker kill delivers a signal straight to the container main process. Unlike docker stop it does not wait - SIGKILL terminates immediately. Use --signal to send something else, like SIGINT or SIGHUP.
Common usage
docker kill web
docker kill --signal=SIGINT web
docker kill $(docker ps -q) # kill all runningCommon errors in CI
"Cannot kill container: ... is not running" means it already exited. Prefer docker stop in CI cleanup so apps flush and shut down cleanly; reach for docker kill only when a container ignores SIGTERM and stop is too slow. SIGKILL gives the process no chance to clean up, which can leave temp state behind.