github.com/pwn-term/docker@v0.0.0-20210616085119-6e977cce2565/cli/docs/reference/commandline/kill.md (about) 1 --- 2 title: "kill" 3 description: "The kill command description and usage" 4 keywords: "container, kill, signal" 5 --- 6 7 # kill 8 9 ```markdown 10 Usage: docker kill [OPTIONS] CONTAINER [CONTAINER...] 11 12 Kill one or more running containers 13 14 Options: 15 --help Print usage 16 -s, --signal string Signal to send to the container (default "KILL") 17 ``` 18 19 ## Description 20 21 The `docker kill` subcommand kills one or more containers. The main process 22 inside the container is sent `SIGKILL` signal (default), or the signal that is 23 specified with the `--signal` option. You can kill a container using the 24 container's ID, ID-prefix, or name. 25 26 > **Note** 27 > 28 > `ENTRYPOINT` and `CMD` in the *shell* form run as a child process of 29 > `/bin/sh -c`, which does not pass signals. This means that the executable is 30 > not the container’s PID 1 and does not receive Unix signals. 31 32 ## Examples 33 34 35 ### Send a KILL signal to a container 36 37 The following example sends the default `KILL` signal to the container named 38 `my_container`: 39 40 ```bash 41 $ docker kill my_container 42 ``` 43 44 ### Send a custom signal to a container 45 46 The following example sends a `SIGHUP` signal to the container named 47 `my_container`: 48 49 ```bash 50 $ docker kill --signal=SIGHUP my_container 51 ``` 52 53 54 You can specify a custom signal either by _name_, or _number_. The `SIG` prefix 55 is optional, so the following examples are equivalent: 56 57 ```bash 58 $ docker kill --signal=SIGHUP my_container 59 $ docker kill --signal=HUP my_container 60 $ docker kill --signal=1 my_container 61 ``` 62 63 Refer to the [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) 64 man-page for a list of standard Linux signals.