Skip to content

Commit 426fe90

Browse files
committed
vendor: github.com/docker/cli eb986ae71b
Signed-off-by: David Karlsson <[email protected]>
1 parent 5766bf6 commit 426fe90

File tree

8 files changed

+80
-13
lines changed

8 files changed

+80
-13
lines changed

_vendor/github.com/docker/cli/docs/reference/run.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# github.com/moby/moby v27.3.1+incompatible
22
# github.com/moby/buildkit v0.17.0
33
# github.com/docker/buildx v0.18.0
4-
# github.com/docker/cli v27.3.2-0.20241008150905-cb3048fbebb1+incompatible
4+
# github.com/docker/cli v27.3.2-0.20241107125754-eb986ae71b0c+incompatible
55
# github.com/docker/compose/v2 v2.30.1
66
# github.com/docker/scout-cli v1.15.0

data/engine-cli/docker_container_restart.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ options:
1010
shorthand: s
1111
value_type: string
1212
description: Signal to send to the container
13+
details_url: '#signal'
1314
deprecated: false
1415
hidden: false
1516
experimental: false
@@ -21,6 +22,7 @@ options:
2122
value_type: int
2223
default_value: "0"
2324
description: Seconds to wait before killing the container
25+
details_url: '#time'
2426
deprecated: false
2527
hidden: false
2628
experimental: false
@@ -42,6 +44,37 @@ examples: |-
4244
```console
4345
$ docker restart my_container
4446
```
47+
48+
49+
### Stop container with signal (-s, --signal) {#signal}
50+
51+
The `--signal` flag sends the system call signal to the container to exit.
52+
This signal can be a signal name in the format `SIG<NAME>`, for instance
53+
`SIGKILL`, or an unsigned number that matches a position in the kernel's
54+
syscall table, for instance `9`. Refer to [signal(7)](https://man7.org/linux/man-pages/man7/signal.7.html)
55+
for available signals.
56+
57+
The default signal to use is defined by the image's [`StopSignal`](https://github.com/opencontainers/image-spec/blob/v1.1.0/config.md),
58+
which can be set through the [`STOPSIGNAL`](/reference/dockerfile/#stopsignal)
59+
Dockerfile instruction when building the image, or configured using the
60+
[`--stop-signal`](/reference/cli/docker/container/run/#stop-signal)
61+
option when creating the container. If no signal is configured for the
62+
container, `SIGTERM` is used as default.
63+
64+
### Stop container with timeout (-t, --timeout) {#time}
65+
66+
The `--time` flag sets the number of seconds to wait for the container
67+
to stop after sending the pre-defined (see [`--signal`]{#signal)) system call signal.
68+
If the container does not exit after the timeout elapses, it's forcibly killed
69+
with a `SIGKILL` signal.
70+
71+
If you set `--time` to `-1`, no timeout is applied, and the daemon
72+
waits indefinitely for the container to exit.
73+
74+
The default timeout can be specified using the [`--stop-timeout`](/reference/cli/docker/container/run/#stop-timeout)
75+
option when creating the container. If no default is configured for the container,
76+
the Daemon determines the default, and is 10 seconds for Linux containers, and
77+
30 seconds for Windows containers.
4578
deprecated: false
4679
hidden: false
4780
experimental: false

data/engine-cli/docker_container_run.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2126,12 +2126,12 @@ examples: |-
21262126
policy controls whether the Docker daemon restarts a container after exit.
21272127
Docker supports the following restart policies:
21282128
2129-
| Policy | Result |
2130-
|:---------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
2131-
| `no` | Do not automatically restart the container when it exits. This is the default. |
2132-
| `on-failure[:max-retries]` | Restart only if the container exits with a non-zero exit status. Optionally, limit the number of restart retries the Docker daemon attempts. |
2133-
| `unless-stopped` | Restart the container unless it's explicitly stopped or Docker itself is stopped or restarted. |
2134-
| `always` | Always restart the container regardless of the exit status. When you specify always, the Docker daemon tries to restart the container indefinitely. The container always starts on daemon startup, regardless of the current state of the container. |
2129+
| Flag | Description |
2130+
| :------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2131+
| `no` | Don't automatically restart the container. (Default) |
2132+
| `on-failure[:max-retries]` | Restart the container if it exits due to an error, which manifests as a non-zero exit code. Optionally, limit the number of times the Docker daemon attempts to restart the container using the `:max-retries` option. The `on-failure` policy only prompts a restart if the container exits with a failure. It doesn't restart the container if the daemon restarts. |
2133+
| `always` | Always restart the container if it stops. If it's manually stopped, it's restarted only when Docker daemon restarts or the container itself is manually restarted. |
2134+
| `unless-stopped` | Similar to `always`, except that when the container is stopped (manually or otherwise), it isn't restarted even after Docker daemon restarts. |
21352135
21362136
```console
21372137
$ docker run --restart=always redis
@@ -2252,7 +2252,7 @@ examples: |-
22522252
22532253
It's conventional to use `host.docker.internal` as the hostname referring to
22542254
`host-gateway`. Docker Desktop automatically resolves this hostname, see
2255-
[Explore networking features](/desktop/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host).
2255+
[Explore networking features](/desktop/features/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host).
22562256
22572257
The following example shows how the special `host-gateway` value works. The
22582258
example runs an HTTP server that serves a file from host to container over the

data/engine-cli/docker_container_stop.yaml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ long: |-
55
The main process inside the container will receive `SIGTERM`, and after a grace
66
period, `SIGKILL`. The first signal can be changed with the `STOPSIGNAL`
77
instruction in the container's Dockerfile, or the `--stop-signal` option to
8-
`docker run`.
8+
`docker run` and `docker create`.
99
usage: docker container stop [OPTIONS] CONTAINER [CONTAINER...]
1010
pname: docker container
1111
plink: docker_container.yaml
@@ -14,6 +14,7 @@ options:
1414
shorthand: s
1515
value_type: string
1616
description: Signal to send to the container
17+
details_url: '#signal'
1718
deprecated: false
1819
hidden: false
1920
experimental: false
@@ -25,6 +26,7 @@ options:
2526
value_type: int
2627
default_value: "0"
2728
description: Seconds to wait before killing the container
29+
details_url: '#time'
2830
deprecated: false
2931
hidden: false
3032
experimental: false
@@ -46,6 +48,36 @@ examples: |-
4648
```console
4749
$ docker stop my_container
4850
```
51+
52+
### Stop container with signal (-s, --signal) {#signal}
53+
54+
The `--signal` flag sends the system call signal to the container to exit.
55+
This signal can be a signal name in the format `SIG<NAME>`, for instance
56+
`SIGKILL`, or an unsigned number that matches a position in the kernel's
57+
syscall table, for instance `9`. Refer to [signal(7)](https://man7.org/linux/man-pages/man7/signal.7.html)
58+
for available signals.
59+
60+
The default signal to use is defined by the image's [`StopSignal`](https://github.com/opencontainers/image-spec/blob/v1.1.0/config.md),
61+
which can be set through the [`STOPSIGNAL`](/reference/dockerfile/#stopsignal)
62+
Dockerfile instruction when building the image, or configured using the
63+
[`--stop-signal`](/reference/cli/docker/container/run/#stop-signal)
64+
option when creating the container. If no signal is configured for the
65+
container, `SIGTERM` is used as default.
66+
67+
### Stop container with timeout (-t, --timeout) {#time}
68+
69+
The `--time` flag sets the number of seconds to wait for the container
70+
to stop after sending the pre-defined (see [`--signal`]{#signal)) system call signal.
71+
If the container does not exit after the timeout elapses, it's forcibly killed
72+
with a `SIGKILL` signal.
73+
74+
If you set `--time` to `-1`, no timeout is applied, and the daemon
75+
waits indefinitely for the container to exit.
76+
77+
The default timeout can be specified using the [`--stop-timeout`](/reference/cli/docker/container/run/#stop-timeout)
78+
option when creating the container. If no default is configured for the container,
79+
the Daemon determines the default, and is 10 seconds for Linux containers, and
80+
30 seconds for Windows containers.
4981
deprecated: false
5082
hidden: false
5183
experimental: false

data/engine-cli/docker_image_build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ command: docker image build
22
aliases: docker image build, docker build, docker builder build
33
short: Build an image from a Dockerfile
44
long: |-
5-
> [!NOTE]
5+
> [!IMPORTANT]
66
> This page refers to the **legacy implementation** of `docker build`,
77
> using the legacy (pre-BuildKit) build backend.
88
> This configuration is only relevant if you're building Windows containers.

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.23.1
44

55
require (
66
github.com/docker/buildx v0.18.0 // indirect
7-
github.com/docker/cli v27.3.2-0.20241008150905-cb3048fbebb1+incompatible // indirect
7+
github.com/docker/cli v27.3.2-0.20241107125754-eb986ae71b0c+incompatible // indirect
88
github.com/docker/compose/v2 v2.30.1 // indirect
99
github.com/docker/scout-cli v1.15.0 // indirect
1010
github.com/moby/buildkit v0.17.0 // indirect
@@ -13,7 +13,7 @@ require (
1313

1414
replace (
1515
github.com/docker/buildx => github.com/docker/buildx v0.18.0
16-
github.com/docker/cli => github.com/docker/cli v27.3.1+incompatible
16+
github.com/docker/cli => github.com/docker/cli v27.3.2-0.20241107125754-eb986ae71b0c+incompatible
1717
github.com/docker/compose/v2 => github.com/docker/compose/v2 v2.30.1
1818
github.com/docker/scout-cli => github.com/docker/scout-cli v1.15.0
1919
github.com/moby/buildkit => github.com/moby/buildkit v0.17.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ github.com/docker/cli v27.3.0+incompatible h1:h7J5eiGdUbH2Q4EcGr1mFb20qzS7Nrot3E
130130
github.com/docker/cli v27.3.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
131131
github.com/docker/cli v27.3.1+incompatible h1:qEGdFBF3Xu6SCvCYhc7CzaQTlBmqDuzxPDpigSyeKQQ=
132132
github.com/docker/cli v27.3.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
133+
github.com/docker/cli v27.3.2-0.20241107125754-eb986ae71b0c+incompatible h1:KqHavmeo5+ct30Z2UKxbVhUEfuzI9JZFgPdVVaWS4Uc=
134+
github.com/docker/cli v27.3.2-0.20241107125754-eb986ae71b0c+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
133135
github.com/docker/compose-cli v1.0.35 h1:uZyEHLalfqBS2PiTpA1LAULyJmuQ+YtZg7nG4Xl3/Cc=
134136
github.com/docker/compose-cli v1.0.35/go.mod h1:mSXI4hFLpRU3EtI8NTo32bNwI0UXSr8jnq+/rYjGAUU=
135137
github.com/docker/compose/v2 v2.22.0 h1:3rRz4L7tPU75wRsV8JZh2/aTgerQvPa1cpzZN+tHqUY=

0 commit comments

Comments
 (0)