mirror of
https://github.com/docker/cli.git
synced 2025-07-29 06:01:13 +03:00
Add STOPSIGNAL
instruction to dockerfiles.
This way, images creators can set the exit signal their programs use. Signed-off-by: David Calavera <david.calavera@gmail.com>
This commit is contained in:
committed by
Tibor Vass
parent
36a36bdaf5
commit
f5b80326a1
@ -61,6 +61,7 @@ Creates a new container.
|
||||
--read-only=false Mount the container's root filesystem as read only
|
||||
--restart="no" Restart policy (no, on-failure[:max-retry], always, unless-stopped)
|
||||
--security-opt=[] Security options
|
||||
--stop-signal="SIGTERM" Signal to stop a container
|
||||
-t, --tty=false Allocate a pseudo-TTY
|
||||
--disable-content-trust=true Skip image verification
|
||||
-u, --user="" Username or UID
|
||||
|
@ -62,6 +62,7 @@ weight=1
|
||||
--restart="no" Restart policy (no, on-failure[:max-retry], always, unless-stopped)
|
||||
--rm=false Automatically remove the container when it exits
|
||||
--security-opt=[] Security Options
|
||||
--stop-signal="SIGTERM" Signal to stop a container
|
||||
--sig-proxy=true Proxy received signals to the process
|
||||
-t, --tty=false Allocate a pseudo-TTY
|
||||
-u, --user="" Username or UID (format: <name|uid>[:<group|gid>])
|
||||
@ -531,3 +532,9 @@ containers with `daemon` user:
|
||||
The 4th container fails and reports "[8] System error: resource temporarily unavailable" error.
|
||||
This fails because the caller set `nproc=3` resulting in the first three containers using up
|
||||
the three processes quota set for the `daemon` user.
|
||||
|
||||
### Stopping a container with a specific signal
|
||||
|
||||
The `--stop-signal` flag sets the system call signal that will be sent to the container to exit.
|
||||
This signal can be a valid unsigned number that matches a position in the kernel's syscall table, for instance 9,
|
||||
or a signal name in the format SIGNAME, for instance SIGKILL.
|
||||
|
Reference in New Issue
Block a user