Skip to content

Commit e085bfa

Browse files
Update buildx reference to v0.28.0 (#23351)
Update the buildx reference documentation to keep in sync with the latest release `v0.28.0` Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: tonistiigi <[email protected]>
1 parent 8e1c55d commit e085bfa

File tree

6 files changed

+257
-50
lines changed

6 files changed

+257
-50
lines changed

_vendor/modules.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# github.com/moby/moby v28.3.3+incompatible
2-
# github.com/moby/buildkit v0.23.2
3-
# github.com/docker/buildx v0.27.0
2+
# github.com/moby/buildkit v0.24.0
3+
# github.com/docker/buildx v0.28.0
44
# github.com/docker/cli v28.3.3+incompatible
55
# github.com/docker/compose/v2 v2.39.2
66
# github.com/docker/model-cli v0.1.39

data/buildx/docker_buildx_dap_build.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,16 +520,18 @@ examples: |-
520520
Command line arguments may be passed to the debug adapter the same way they would be passed to the normal build command and they will set the value.
521521
Launch request arguments that are set will override command line arguments if they are present.
522522
523-
A debug extension should include an `args` entry in the launch configuration and should append these arguments to the end of the tool invocation.
523+
A debug extension should include an `args` and `builder` entry in the launch configuration. These will modify the arguments passed to the binary for the tool invocation.
524+
`builder` will add `--builder <arg>` directly after the executable and `args` will append to the end of the tool invocation.
524525
For example, a launch configuration in Visual Studio Code with the following:
525526
526527
```json
527528
{
528529
"args": ["--build-arg", "FOO=AAA"]
530+
"builder": ["mybuilder"]
529531
}
530532
```
531533
532-
This should cause the debug adapter to be invoked as `docker buildx dap build --build-arg FOO=AAA`.
534+
This should cause the debug adapter to be invoked as `docker buildx --builder mybuilder dap build --build-arg FOO=AAA`.
533535
deprecated: false
534536
hidden: false
535537
experimental: false

data/buildx/docker_buildx_du.yaml

Lines changed: 158 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ options:
88
- option: filter
99
value_type: filter
1010
description: Provide filter values
11+
details_url: '#filter'
12+
deprecated: false
13+
hidden: false
14+
experimental: false
15+
experimentalcli: false
16+
kubernetes: false
17+
swarm: false
18+
- option: format
19+
value_type: string
20+
description: Format the output
21+
details_url: '#format'
1122
deprecated: false
1223
hidden: false
1324
experimental: false
@@ -17,7 +28,7 @@ options:
1728
- option: verbose
1829
value_type: bool
1930
default_value: "false"
20-
description: Provide a more verbose output
31+
description: Shorthand for `--format=pretty`
2132
details_url: '#verbose'
2233
deprecated: false
2334
hidden: false
@@ -77,7 +88,7 @@ examples: |-
7788
the record, even if you use `--all`. That's because the record is actively in
7889
use by some component of the builder.
7990
80-
The asterisks (\*) in the default output indicate the following:
91+
The asterisks (\*) in the default output format indicate the following:
8192
8293
- An asterisk next to an ID (`zu7m6evdpebh5h8kfkpw9dlf2*`) indicates that the record
8394
is mutable. The size of the record may change, or another build can take ownership of
@@ -88,41 +99,164 @@ examples: |-
8899
If you prune such a record then you will lose build cache but only metadata
89100
will be deleted as the image still needs to actual storage layers.
90101
102+
### Provide filter values (--filter) {#filter}
103+
104+
Same as [`buildx prune --filter`](/reference/cli/docker/buildx/prune/#filter).
105+
106+
### Format the output (--format) {#format}
107+
108+
The formatting options (`--format`) pretty-prints usage information output
109+
using a Go template.
110+
111+
Valid placeholders for the Go template are:
112+
113+
* `.ID`
114+
* `.Parents`
115+
* `.CreatedAt`
116+
* `.Mutable`
117+
* `.Reclaimable`
118+
* `.Shared`
119+
* `.Size`
120+
* `.Description`
121+
* `.UsageCount`
122+
* `.LastUsedAt`
123+
* `.Type`
124+
125+
When using the `--format` option, the `du` command will either output the data
126+
exactly as the template declares or, when using the `table` directive, includes
127+
column headers as well.
128+
129+
The `pretty` format is useful for inspecting the disk usage records in more
130+
detail. It shows the mutable and shared states more clearly, as well as
131+
additional information about the corresponding layer:
132+
133+
```console
134+
$ docker buildx du --format=pretty
135+
...
136+
ID: 6wqu0v6hjdwvhh8yjozrepaof
137+
Parents:
138+
- bqx15bcewecz4wcg14b7iodvp
139+
Created at: 2025-06-12 15:44:02.715795569 +0000 UTC
140+
Mutable: false
141+
Reclaimable: true
142+
Shared: true
143+
Size: 1.653GB
144+
Description: [build-base 4/4] COPY . .
145+
Usage count: 1
146+
Last used: 2 months ago
147+
Type: regular
148+
149+
Shared: 35.57GB
150+
Private: 97.94GB
151+
Reclaimable: 131.5GB
152+
Total: 133.5GB
153+
```
154+
155+
The following example uses a template without headers and outputs the
156+
`ID` and `Size` entries separated by a colon (`:`):
157+
158+
```console
159+
$ docker buildx du --format "{{.ID}}: {{.Size}}"
160+
6wqu0v6hjdwvhh8yjozrepaof: 1.653GB
161+
4m8061kctvjyh9qleus8rgpgx: 1.723GB
162+
fcm9mlz2641u8r5eicjqdhy1l: 1.841GB
163+
z2qu1swvo3afzd9mhihi3l5k0: 1.873GB
164+
nmi6asc00aa3ja6xnt6o7wbrr: 2.027GB
165+
0qlam41jxqsq6i27yqllgxed3: 2.495GB
166+
3w9qhzzskq5jc262snfu90bfz: 2.617GB
167+
```
168+
169+
The following example uses a `table` template and outputs the `ID` and
170+
`Description`:
171+
172+
```console
173+
$ docker buildx du --format "table {{.ID}} {{.Description}}"
174+
ID DESCRIPTION
175+
03bbhchaib8cygqs68um6hfnl [binaries-linux 2/5] LINK COPY --link --from=binfmt-filter /out/ /
176+
2h8un0tyg57oj64xvbas6mzea [cni-plugins-export 2/4] LINK COPY --link --from=cni-plugins /opt/cni/bin/loopback /buildkit-cni-loopback
177+
evckox33t07ob9dmollhn4h4j [cni-plugins-export 3/4] LINK COPY --link --from=cni-plugins /opt/cni/bin/host-local /buildkit-cni-host-local
178+
jlxzwcw6xaomxj8irerow9bhb [binaries-linux 4/5] LINK COPY --link --from=buildctl /usr/bin/buildctl /
179+
ov2oetgebkhpsw39rv1sbh5w1 [buildkit-linux 1/1] LINK COPY --link --from=binaries / /usr/bin/
180+
ruoczhyq25n5v9ld7n231zalx [binaries-linux 3/5] LINK COPY --link --from=cni-plugins-export-squashed / /
181+
ax7cov6kizxi9ufvcwsef4occ* local source for context
182+
```
183+
184+
JSON output is also supported and will print as newline delimited JSON:
185+
186+
```console
187+
$ docker buildx du --format=json
188+
{"CreatedAt":"2025-07-29T12:36:01Z","Description":"pulled from docker.io/library/rust:1.85.1-bookworm@sha256:e51d0265072d2d9d5d320f6a44dde6b9ef13653b035098febd68cce8fa7c0bc4","ID":"ic1gfidvev5nciupzz53alel4","LastUsedAt":"2025-07-29T12:36:01Z","Mutable":false,"Parents":["hmpdhm4sjrfpmae4xm2y3m0ra"],"Reclaimable":true,"Shared":false,"Size":"829889526","Type":"regular","UsageCount":1}
189+
{"CreatedAt":"2025-08-05T09:24:09Z","Description":"pulled from docker.io/library/node:22@sha256:3218f0d1b9e4b63def322e9ae362d581fbeac1ef21b51fc502ef91386667ce92","ID":"jsw7fx09l5zsda3bri1z4mwk5","LastUsedAt":"2025-08-05T09:24:09Z","Mutable":false,"Parents":["098jsj5ebbv1w47ikqigeuurs"],"Reclaimable":true,"Shared":true,"Size":"829898832","Type":"regular","UsageCount":1}
190+
```
191+
192+
You can use `jq` to pretty-print the JSON output:
193+
194+
```console
195+
$ docker buildx du --format=json | jq .
196+
{
197+
"CreatedAt": "2025-07-29T12:36:01Z",
198+
"Description": "pulled from docker.io/library/rust:1.85.1-bookworm@sha256:e51d0265072d2d9d5d320f6a44dde6b9ef13653b035098febd68cce8fa7c0bc4",
199+
"ID": "ic1gfidvev5nciupzz53alel4",
200+
"LastUsedAt": "2025-07-29T12:36:01Z",
201+
"Mutable": false,
202+
"Parents": [
203+
"hmpdhm4sjrfpmae4xm2y3m0ra"
204+
],
205+
"Reclaimable": true,
206+
"Shared": false,
207+
"Size": "829889526",
208+
"Type": "regular",
209+
"UsageCount": 1
210+
}
211+
{
212+
"CreatedAt": "2025-08-05T09:24:09Z",
213+
"Description": "pulled from docker.io/library/node:22@sha256:3218f0d1b9e4b63def322e9ae362d581fbeac1ef21b51fc502ef91386667ce92",
214+
"ID": "jsw7fx09l5zsda3bri1z4mwk5",
215+
"LastUsedAt": "2025-08-05T09:24:09Z",
216+
"Mutable": false,
217+
"Parents": [
218+
"098jsj5ebbv1w47ikqigeuurs"
219+
],
220+
"Reclaimable": true,
221+
"Shared": true,
222+
"Size": "829898832",
223+
"Type": "regular",
224+
"UsageCount": 1
225+
}
226+
```
227+
91228
### Use verbose output (--verbose) {#verbose}
92229
93-
The verbose output of the `docker buildx du` command is useful for inspecting
94-
the disk usage records in more detail. The verbose output shows the mutable and
95-
shared states more clearly, as well as additional information about the
96-
corresponding layer.
230+
Shorthand for [`--format=pretty`](#format):
97231
98232
```console
99233
$ docker buildx du --verbose
100234
...
101-
Last used: 2 days ago
102-
Type: regular
103-
104-
ID: 05d0elirb4mmvpmnzbrp3ssrg
105-
Parent: e8sfdn4mygrg7msi9ak1dy6op
106-
Created at: 2023-11-20 09:53:30.881558721 +0000 UTC
107-
Mutable: false
108-
Reclaimable: true
109-
Shared: false
110-
Size: 0B
111-
Description: [gobase 3/3] WORKDIR /src
112-
Usage count: 3
113-
Last used: 24 hours ago
114-
Type: regular
115-
116-
Reclaimable: 4.453GB
117-
Total: 4.453GB
235+
ID: 6wqu0v6hjdwvhh8yjozrepaof
236+
Parents:
237+
- bqx15bcewecz4wcg14b7iodvp
238+
Created at: 2025-06-12 15:44:02.715795569 +0000 UTC
239+
Mutable: false
240+
Reclaimable: true
241+
Shared: true
242+
Size: 1.653GB
243+
Description: [build-base 4/4] COPY . .
244+
Usage count: 1
245+
Last used: 2 months ago
246+
Type: regular
247+
248+
Shared: 35.57GB
249+
Private: 97.94GB
250+
Reclaimable: 131.5GB
251+
Total: 133.5GB
118252
```
119253
120254
### Override the configured builder instance (--builder) {#builder}
121255
122256
Use the `--builder` flag to inspect the disk usage of a particular builder.
123257
124258
```console
125-
$ docker buildx du --builder youthful_shtern
259+
$ docker buildx du --builder mybuilder
126260
ID RECLAIMABLE SIZE LAST ACCESSED
127261
g41agepgdczekxg2mtw0dujsv* true 1.312GB 47 hours ago
128262
e6ycrsa0bn9akigqgzu0sc6kr true 318MB 47 hours ago

0 commit comments

Comments
 (0)