mirror of
https://github.com/docker/cli.git
synced 2026-09-28 02:06:53 -04:00
Add config parameter to change per-container stop timeout during daemon shutdown
This fix tries to add a flag `--stop-timeout` to specify the timeout value (in seconds) for the container to stop before SIGKILL is issued. If stop timeout is not specified then the default timeout (10s) is used. Additional test cases have been added to cover the change. This fix is related to #22471. Another pull request will add `--shutdown-timeout` to daemon for #22471. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
@@ -68,6 +68,7 @@ docker-create - Create a new container
|
||||
[**--security-opt**[=*[]*]]
|
||||
[**--storage-opt**[=*[]*]]
|
||||
[**--stop-signal**[=*SIGNAL*]]
|
||||
[**--stop-timeout**[=*TIMEOUT*]]
|
||||
[**--shm-size**[=*[]*]]
|
||||
[**--sysctl**[=*[]*]]
|
||||
[**-t**|**--tty**]
|
||||
@@ -352,6 +353,9 @@ unit, `b` is used. Set LIMIT to `-1` to enable unlimited swap.
|
||||
**--stop-signal**=*SIGTERM*
|
||||
Signal to stop a container. Default is SIGTERM.
|
||||
|
||||
**--stop-timeout**=*10*
|
||||
Timeout (in seconds) to stop a container. Default is 10.
|
||||
|
||||
**--sysctl**=SYSCTL
|
||||
Configure namespaced kernel parameters at runtime
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ docker-run - Run a command in a new container
|
||||
[**--security-opt**[=*[]*]]
|
||||
[**--storage-opt**[=*[]*]]
|
||||
[**--stop-signal**[=*SIGNAL*]]
|
||||
[**--stop-timeout**[=*TIMEOUT*]]
|
||||
[**--shm-size**[=*[]*]]
|
||||
[**--sig-proxy**[=*true*]]
|
||||
[**--sysctl**[=*[]*]]
|
||||
@@ -502,6 +503,9 @@ incompatible with any restart policy other than `none`.
|
||||
**--stop-signal**=*SIGTERM*
|
||||
Signal to stop a container. Default is SIGTERM.
|
||||
|
||||
**--stop-timeout**=*10*
|
||||
Timeout (in seconds) to stop a container. Default is 10.
|
||||
|
||||
**--shm-size**=""
|
||||
Size of `/dev/shm`. The format is `<number><unit>`.
|
||||
`number` must be greater than `0`. Unit is optional and can be `b` (bytes), `k` (kilobytes), `m`(megabytes), or `g` (gigabytes).
|
||||
|
||||
Reference in New Issue
Block a user