mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
docker stop sends SIGTERM and SIGKILL, docker kill sends SIGKILL
This commit is contained in:
parent
b038b0cd44
commit
82f1514895
2 changed files with 8 additions and 4 deletions
|
@ -491,7 +491,7 @@ func (cli *DockerCli) CmdInfo(args ...string) error {
|
|||
}
|
||||
|
||||
func (cli *DockerCli) CmdStop(args ...string) error {
|
||||
cmd := Subcmd("stop", "[OPTIONS] CONTAINER [CONTAINER...]", "Stop a running container")
|
||||
cmd := Subcmd("stop", "[OPTIONS] CONTAINER [CONTAINER...]", "Stop a running container (Send SIGTERM, and then SIGKILL after grace period)")
|
||||
nSeconds := cmd.Int("t", 10, "Number of seconds to wait for the container to stop before killing it.")
|
||||
if err := cmd.Parse(args); err != nil {
|
||||
return nil
|
||||
|
@ -850,7 +850,7 @@ func (cli *DockerCli) CmdRm(args ...string) error {
|
|||
|
||||
// 'docker kill NAME' kills a running container
|
||||
func (cli *DockerCli) CmdKill(args ...string) error {
|
||||
cmd := Subcmd("kill", "CONTAINER [CONTAINER...]", "Kill a running container")
|
||||
cmd := Subcmd("kill", "CONTAINER [CONTAINER...]", "Kill a running container (send SIGKILL)")
|
||||
if err := cmd.Parse(args); err != nil {
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -401,7 +401,9 @@ Insert file from github
|
|||
|
||||
Usage: docker kill CONTAINER [CONTAINER...]
|
||||
|
||||
Kill a running container
|
||||
Kill a running container (Send SIGKILL)
|
||||
|
||||
The main process inside the container will be sent SIGKILL.
|
||||
|
||||
.. _cli_login:
|
||||
|
||||
|
@ -704,10 +706,12 @@ to the newly created container.
|
|||
|
||||
Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...]
|
||||
|
||||
Stop a running container
|
||||
Stop a running container (Send SIGTERM, and then SIGKILL after grace period)
|
||||
|
||||
-t=10: Number of seconds to wait for the container to stop before killing it.
|
||||
|
||||
The main process inside the container will receive SIGTERM, and after a grace period, SIGKILL
|
||||
|
||||
.. _cli_tag:
|
||||
|
||||
``tag``
|
||||
|
|
Loading…
Reference in a new issue