Skip to content

Commit fae74c2

Browse files
committed
data/engine-cli: update to 28.2.0
Signed-off-by: Paweł Gronowski <[email protected]>
1 parent 41ad7dc commit fae74c2

13 files changed

+334
-70
lines changed

data/engine-cli/docker.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ long: |-
339339
list of root Certificate Authorities.
340340
cname:
341341
- docker attach
342+
- docker bake
342343
- docker build
343344
- docker builder
344345
- docker checkpoint
@@ -397,6 +398,7 @@ cname:
397398
- docker wait
398399
clink:
399400
- docker_attach.yaml
401+
- docker_bake.yaml
400402
- docker_build.yaml
401403
- docker_builder.yaml
402404
- docker_checkpoint.yaml

data/engine-cli/docker_bake.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
command: docker bake
2+
aliases: docker buildx bake
3+
short: Build from a file
4+
long: Build from a file
5+
usage: docker bake [OPTIONS] [TARGET...]
6+
pname: docker
7+
plink: docker.yaml
8+
inherited_options:
9+
- option: help
10+
value_type: bool
11+
default_value: "false"
12+
description: Print usage
13+
deprecated: false
14+
hidden: true
15+
experimental: false
16+
experimentalcli: false
17+
kubernetes: false
18+
swarm: false
19+
deprecated: false
20+
hidden: false
21+
min_api_version: "1.31"
22+
experimental: false
23+
experimentalcli: false
24+
kubernetes: false
25+
swarm: false
26+

data/engine-cli/docker_container_create.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,16 @@ options:
971971
experimentalcli: false
972972
kubernetes: false
973973
swarm: false
974+
- option: use-api-socket
975+
value_type: bool
976+
default_value: "false"
977+
description: Bind mount Docker API socket and required auth
978+
deprecated: false
979+
hidden: false
980+
experimental: false
981+
experimentalcli: true
982+
kubernetes: false
983+
swarm: false
974984
- option: user
975985
shorthand: u
976986
value_type: string

data/engine-cli/docker_container_run.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,16 @@ options:
10241024
experimentalcli: false
10251025
kubernetes: false
10261026
swarm: false
1027+
- option: use-api-socket
1028+
value_type: bool
1029+
default_value: "false"
1030+
description: Bind mount Docker API socket and required auth
1031+
deprecated: false
1032+
hidden: false
1033+
experimental: false
1034+
experimentalcli: false
1035+
kubernetes: false
1036+
swarm: false
10271037
- option: user
10281038
shorthand: u
10291039
value_type: string
@@ -1356,7 +1366,7 @@ examples: |-
13561366
### Set working directory (-w, --workdir) {#workdir}
13571367
13581368
```console
1359-
$ docker run -w /path/to/dir/ -i -t ubuntu pwd
1369+
$ docker run -w /path/to/dir/ ubuntu pwd
13601370
```
13611371
13621372
The `-w` option runs the command executed inside the directory specified, in this example,

data/engine-cli/docker_create.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,16 @@ options:
954954
experimentalcli: false
955955
kubernetes: false
956956
swarm: false
957+
- option: use-api-socket
958+
value_type: bool
959+
default_value: "false"
960+
description: Bind mount Docker API socket and required auth
961+
deprecated: false
962+
hidden: false
963+
experimental: false
964+
experimentalcli: true
965+
kubernetes: false
966+
swarm: false
957967
- option: user
958968
shorthand: u
959969
value_type: string

data/engine-cli/docker_image_build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ long: |-
5151
file to exclude files and directories that you don't require in your build from
5252
being sent as part of the build context.
5353
54-
#### Access paths outside the build context
54+
#### Accessing paths outside the build context
5555
5656
The legacy builder will error out if you try to access files outside of the
5757
build context using relative paths in your Dockerfile.

data/engine-cli/docker_image_import.yaml

Lines changed: 102 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ long: |-
99
(root). If you specify an individual file, you must specify the full path within
1010
the host. To import from a remote location, specify a `URI` that begins with the
1111
`http://` or `https://` protocol.
12-
13-
The `--change` option applies `Dockerfile` instructions to the image that is
14-
created. Supported `Dockerfile` instructions:
15-
`CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR`
1612
usage: docker image import [OPTIONS] file|URL|- [REPOSITORY[:TAG]]
1713
pname: docker image
1814
plink: docker_image.yaml
@@ -21,6 +17,7 @@ options:
2117
shorthand: c
2218
value_type: list
2319
description: Apply Dockerfile instruction to the created image
20+
details_url: '#change'
2421
deprecated: false
2522
hidden: false
2623
experimental: false
@@ -31,6 +28,7 @@ options:
3128
shorthand: m
3229
value_type: string
3330
description: Set commit message for imported image
31+
details_url: '#message'
3432
deprecated: false
3533
hidden: false
3634
experimental: false
@@ -40,6 +38,7 @@ options:
4038
- option: platform
4139
value_type: string
4240
description: Set platform if server is multi-platform capable
41+
details_url: '#platform'
4342
deprecated: false
4443
hidden: false
4544
min_api_version: "1.32"
@@ -75,12 +74,6 @@ examples: |-
7574
$ cat exampleimage.tgz | docker import - exampleimagelocal:new
7675
```
7776
78-
Import with a commit message.
79-
80-
```console
81-
$ cat exampleimage.tgz | docker import --message "New image imported from tarball" - exampleimagelocal:new
82-
```
83-
8477
Import to docker from a local archive.
8578
8679
```console
@@ -93,16 +86,109 @@ examples: |-
9386
$ sudo tar -c . | docker import - exampleimagedir
9487
```
9588
96-
### Import from a local directory with new configurations
97-
98-
```console
99-
$ sudo tar -c . | docker import --change "ENV DEBUG=true" - exampleimagedir
100-
```
101-
10289
Note the `sudo` in this example – you must preserve
10390
the ownership of the files (especially root ownership) during the
10491
archiving with tar. If you are not root (or the sudo command) when you
10592
tar, then the ownerships might not get preserved.
93+
94+
### Import with new configurations (-c, --change) {#change}
95+
96+
The `--change` option applies `Dockerfile` instructions to the image that is
97+
created. Not all `Dockerfile` instructions are supported; the list of instructions
98+
is limited to metadata (configuration) changes. The following `Dockerfile`
99+
instructions are supported:
100+
101+
- [`CMD`](/reference/dockerfile/#cmd)
102+
- [`ENTRYPOINT`](/reference/dockerfile/#entrypoint)
103+
- [`ENV`](/reference/dockerfile/#env)
104+
- [`EXPOSE`](/reference/dockerfile/#expose)
105+
- [`HEALTHCHECK`](/reference/dockerfile/#healthcheck)
106+
- [`LABEL`](/reference/dockerfile/#label)
107+
- [`ONBUILD`](/reference/dockerfile/#onbuild)
108+
- [`STOPSIGNAL`](/reference/dockerfile/#stopsignal)
109+
- [`USER`](/reference/dockerfile/#user)
110+
- [`VOLUME`](/reference/dockerfile/#volume)
111+
- [`WORKDIR`](/reference/dockerfile/#workdir)
112+
113+
The following example imports an image from a TAR-file containing a root-filesystem,
114+
and sets the `DEBUG` environment-variable in the resulting image:
115+
116+
```console
117+
$ docker import --change "ENV DEBUG=true" ./rootfs.tgz exampleimagedir
118+
```
119+
120+
The `--change` option can be set multiple times to apply multiple `Dockerfile`
121+
instructions. The example below sets the `LABEL1` and `LABEL2` labels on
122+
the imported image, in addition to the `DEBUG` environment variable from
123+
the previous example:
124+
125+
```console
126+
$ docker import \
127+
--change "ENV DEBUG=true" \
128+
--change "LABEL LABEL1=hello" \
129+
--change "LABEL LABEL2=world" \
130+
./rootfs.tgz exampleimagedir
131+
```
132+
133+
### Import with a commit message (-m, --message) {#message}
134+
135+
The `--message` (or `-m`) option allows you to set a custom comment in
136+
the image's metadata. The following example imports an image from a local
137+
archive and sets a custom message.
138+
139+
```console
140+
$ docker import --message "New image imported from tarball" ./rootfs.tgz exampleimagelocal:new
141+
sha256:25e54c0df7dc49da9093d50541e0ed4508a6b78705057f1a9bebf1d564e2cb00
142+
```
143+
144+
After importing, the message is set in the "Comment" field of the image's
145+
configuration, which is shown when viewing the image's history:
146+
147+
```console
148+
$ docker image history exampleimagelocal:new
149+
150+
IMAGE CREATED CREATED BY SIZE COMMENT
151+
25e54c0df7dc 2 minutes ago 53.6MB New image imported from tarball
152+
```
153+
154+
### When the daemon supports multiple operating systems
155+
156+
If the daemon supports multiple operating systems, and the image being imported
157+
does not match the default operating system, it may be necessary to add
158+
`--platform`. This would be necessary when importing a Linux image into a Windows
159+
daemon.
160+
161+
```console
162+
$ docker import --platform=linux .\linuximage.tar
163+
```
164+
165+
### Set the platform for the imported image (--platform) {#platform}
166+
167+
The `--platform` option allows you to specify the platform for the imported
168+
image. By default, the daemon's native platform is used as platform, but
169+
the `--platform` option allows you to override the default, for example, in
170+
situations where the imported root filesystem is for a different architecture
171+
or operating system.
172+
173+
The platform option takes the `os[/arch[/variant]]` format; for example,
174+
`linux/amd64` or `linux/arm64/v8`. Architecture and variant are optional,
175+
and default to the daemon's native architecture if omitted.
176+
177+
The following example imports an image from a root-filesystem in `rootfs.tgz`,
178+
and sets the image's platform to `linux/amd64`;
179+
180+
```console
181+
$ docker image import --platform=linux/amd64 ./rootfs.tgz imported:latest
182+
sha256:44a8b44157dad5edcff85f0c93a3e455f3b20a046d025af4ec50ed990d7ebc09
183+
```
184+
185+
After importing the image, the image's platform is set in the image's
186+
configuration;
187+
188+
```console
189+
$ docker image inspect --format '{{.Os}}/{{.Architecture}}' imported:latest
190+
linux/amd64
191+
```
106192
deprecated: false
107193
hidden: false
108194
experimental: false

data/engine-cli/docker_image_inspect.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ options:
1919
experimentalcli: false
2020
kubernetes: false
2121
swarm: false
22+
- option: platform
23+
value_type: string
24+
description: |-
25+
Inspect a specific platform of the multi-platform image.
26+
If the image or the server is not multi-platform capable, the command will error out if the platform does not match.
27+
'os[/arch[/variant]]': Explicit platform (eg. linux/amd64)
28+
deprecated: false
29+
hidden: false
30+
min_api_version: "1.49"
31+
experimental: false
32+
experimentalcli: false
33+
kubernetes: false
34+
swarm: false
2235
inherited_options:
2336
- option: help
2437
value_type: bool

data/engine-cli/docker_image_rm.yaml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,19 @@ options:
3535
experimentalcli: false
3636
kubernetes: false
3737
swarm: false
38+
- option: platform
39+
value_type: stringSlice
40+
default_value: '[]'
41+
description: |
42+
Remove only the given platform variant. Formatted as `os[/arch[/variant]]` (e.g., `linux/amd64`)
43+
details_url: '#platform'
44+
deprecated: false
45+
hidden: false
46+
min_api_version: "1.50"
47+
experimental: false
48+
experimentalcli: false
49+
kubernetes: false
50+
swarm: false
3851
inherited_options:
3952
- option: help
4053
value_type: bool
@@ -122,6 +135,76 @@ examples: |-
122135
Deleted: ea13149945cb6b1e746bf28032f02e9b5a793523481a0a18645fc77ad53c4ea2
123136
Deleted: df7546f9f060a2268024c8a230d8639878585defcc1bc6f79d2728a13957871b
124137
```
138+
139+
### Remove specific platforms (`--platform`) {#platform}
140+
141+
The `--platform` option allows you to specify which platform variants of the
142+
image to remove. By default, `docker image remove` removes all platform variants
143+
that are present. Use the `--platform` option to specify which platform variant
144+
of the image to remove.
145+
146+
Removing a specific platform removes the image from all images that reference
147+
the same content, and requires the `--force` option to be used. Omitting the
148+
`--force` option produces a warning, and the remove is canceled:
149+
150+
```console
151+
$ docker image rm --platform=linux/amd64 alpine
152+
Error response from daemon: Content will be removed from all images referencing this variant. Use —-force to force delete.
153+
```
154+
155+
The platform option takes the `os[/arch[/variant]]` format; for example,
156+
`linux/amd64` or `linux/arm64/v8`. Architecture and variant are optional,
157+
and default to the daemon's native architecture if omitted.
158+
159+
You can pass multiple platforms either by passing the `--platform` flag
160+
multiple times, or by passing a comma-separated list of platforms to remove.
161+
The following uses of this option are equivalent;
162+
163+
```console
164+
$ docker image rm --plaform linux/amd64 --platform linux/ppc64le myimage
165+
$ docker image rm --plaform linux/amd64,linux/ppc64le myimage
166+
```
167+
168+
The following example removes the `linux/amd64` and `linux/ppc64le` variants
169+
of an `alpine` image that contains multiple platform variants in the image
170+
cache:
171+
172+
```console
173+
$ docker image ls --tree
174+
175+
IMAGE ID DISK USAGE CONTENT SIZE EXTRA
176+
alpine:latest a8560b36e8b8 37.8MB 11.2MB U
177+
├─ linux/amd64 1c4eef651f65 12.1MB 3.64MB U
178+
├─ linux/arm/v6 903bfe2ae994 0B 0B
179+
├─ linux/arm/v7 9c2d245b3c01 0B 0B
180+
├─ linux/arm64/v8 757d680068d7 12.8MB 3.99MB
181+
├─ linux/386 2436f2b3b7d2 0B 0B
182+
├─ linux/ppc64le 9ed53fd3b831 12.8MB 3.58MB
183+
├─ linux/riscv64 1de5eb4a9a67 0B 0B
184+
└─ linux/s390x fe0dcdd1f783 0B 0B
185+
186+
$ docker image --platform=linux/amd64,linux/ppc64le --force alpine
187+
Deleted: sha256:1c4eef651f65e2f7daee7ee785882ac164b02b78fb74503052a26dc061c90474
188+
Deleted: sha256:9ed53fd3b83120f78b33685d930ce9bf5aa481f6e2d165c42cbbddbeaa196f6f
189+
```
190+
191+
After the command completes, the given variants of the `alpine` image are removed
192+
from the image cache:
193+
194+
```console
195+
$ docker image ls --tree
196+
197+
IMAGE ID DISK USAGE CONTENT SIZE EXTRA
198+
alpine:latest a8560b36e8b8 12.8MB 3.99MB
199+
├─ linux/amd64 1c4eef651f65 0B 0B
200+
├─ linux/arm/v6 903bfe2ae994 0B 0B
201+
├─ linux/arm/v7 9c2d245b3c01 0B 0B
202+
├─ linux/arm64/v8 757d680068d7 12.8MB 3.99MB
203+
├─ linux/386 2436f2b3b7d2 0B 0B
204+
├─ linux/ppc64le 9ed53fd3b831 0B 0B
205+
├─ linux/riscv64 1de5eb4a9a67 0B 0B
206+
└─ linux/s390x fe0dcdd1f783 0B 0B
207+
```
125208
deprecated: false
126209
hidden: false
127210
experimental: false

0 commit comments

Comments
 (0)