# docker kill: Force-Stop Containers with a Signal

> How docker kill works: sending SIGKILL or a custom signal to a container immediately, and how it differs from docker stop in CI.

Source: https://latchkey.dev/learn/command-reference/docker-kill-command  
Updated: 2026-06-25

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

```Terminal
docker kill web
docker kill --signal=SIGINT web
docker kill $(docker ps -q)             # kill all running
```

## Common 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.

## FAQ

### docker kill: Force-Stop Containers with 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 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.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
