github.com/AliyunContainerService/cli@v0.0.0-20181009023821-814ced4b30d0/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 <!-- This file is maintained within the docker/cli GitHub 8 repository at https://github.com/docker/cli/. Make all 9 pull requests against that repo. If you see this file in 10 another repository, consider it read-only there, as it will 11 periodically be overwritten by the definitive file. Pull 12 requests which include edits to this file in other repositories 13 will be rejected. 14 --> 15 16 # kill 17 18 ```markdown 19 Usage: docker kill [OPTIONS] CONTAINER [CONTAINER...] 20 21 Kill one or more running containers 22 23 Options: 24 --help Print usage 25 -s, --signal string Signal to send to the container (default "KILL") 26 ``` 27 28 ## Description 29 30 The `docker kill` subcommand kills one or more containers. The main process 31 inside the container is sent `SIGKILL` signal (default), or the signal that is 32 specified with the `--signal` option. You can kill a container using the 33 container's ID, ID-prefix, or name. 34 35 > **Note**: `ENTRYPOINT` and `CMD` in the *shell* form run as a subcommand of 36 > `/bin/sh -c`, which does not pass signals. This means that the executable is 37 > not the container’s PID 1 and does not receive Unix signals. 38 39 ## Examples 40 41 42 ### Send a KILL signal to a container 43 44 The following example sends the default `KILL` signal to the container named 45 `my_container`: 46 47 ```bash 48 $ docker kill my_container 49 ``` 50 51 ### Send a custom signal to a container 52 53 The following example sends a `SIGHUP` signal to the container named 54 `my_container`: 55 56 ```bash 57 $ docker kill --signal=SIGHUP my_container 58 ``` 59 60 61 You can specify a custom signal either by _name_, or _number_. The `SIG` prefix 62 is optional, so the following examples are equivalent: 63 64 ```bash 65 $ docker kill --signal=SIGHUP my_container 66 $ docker kill --signal=HUP my_container 67 $ docker kill --signal=1 my_container 68 ``` 69 70 Refer to the [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) 71 man-page for a list of standard Linux signals.