YouTip LogoYouTip

Docker Kill Command

# docker kill Command [![Image 3: Docker Command Manual](#)Docker Command Manual](#) * * * The docker kill command is used to immediately terminate one or more running containers. Unlike the docker stop command, the docker kill command directly sends a SIGKILL signal to the container's main process, causing the container to stop immediately without performing a graceful shutdown. ### Syntax docker kill CONTAINER [CONTAINER...] OPTIONS Description: * **`-s, --signal`**: The signal to send to the container (default is SIGKILL). **Common Signals** * **SIGKILL**: Forcefully terminates the process (default signal). * **SIGTERM**: Requests the process to terminate. * **SIGINT**: Sends an interrupt signal, typically indicating a user request to terminate. * **SIGHUP**: Hangup signal, typically indicating a terminal disconnect. ### Examples Immediately terminate a container: docker kill my_container Immediately terminates the container named my_container. Send a custom signal: docker kill -s SIGTERM my_container Sends a SIGTERM signal to the container named my_container, instead of the default SIGKILL signal. Terminate multiple containers simultaneously: docker kill container1 container2 container3 Immediately terminates the container1, container2, and container3 containers. The `docker kill` command is used to immediately terminate one or more running containers by sending a signal (default SIGKILL) to the container's main process. Unlike `docker stop`, `docker kill` does not wait for the container to stop gracefully but terminates the process directly. This command is very useful when you need to stop a container quickly, but it should be used with caution to avoid data loss or inconsistency. * * Docker Command Manual](#)
← Docker Install CentosDocker Run Command β†’