You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]>
Copy file name to clipboardExpand all lines: data/buildx/docker_buildx_dap_build.yaml
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -520,16 +520,18 @@ examples: |-
520
520
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.
521
521
Launch request arguments that are set will override command line arguments if they are present.
522
522
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.
524
525
For example, a launch configuration in Visual Studio Code with the following:
525
526
526
527
```json
527
528
{
528
529
"args": ["--build-arg", "FOO=AAA"]
530
+
"builder": ["mybuilder"]
529
531
}
530
532
```
531
533
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`.
the record, even if you use `--all`. That's because the record is actively in
78
89
use by some component of the builder.
79
90
80
-
The asterisks (\*) in the default output indicate the following:
91
+
The asterisks (\*) in the default output format indicate the following:
81
92
82
93
- An asterisk next to an ID (`zu7m6evdpebh5h8kfkpw9dlf2*`) indicates that the record
83
94
is mutable. The size of the record may change, or another build can take ownership of
@@ -88,41 +99,164 @@ examples: |-
88
99
If you prune such a record then you will lose build cache but only metadata
89
100
will be deleted as the image still needs to actual storage layers.
90
101
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
+
91
228
### Use verbose output (--verbose) {#verbose}
92
229
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):
97
231
98
232
```console
99
233
$ docker buildx du --verbose
100
234
...
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
118
252
```
119
253
120
254
### Override the configured builder instance (--builder) {#builder}
121
255
122
256
Use the `--builder` flag to inspect the disk usage of a particular builder.
123
257
124
258
```console
125
-
$ docker buildx du --builder youthful_shtern
259
+
$ docker buildx du --builder mybuilder
126
260
ID RECLAIMABLE SIZE LAST ACCESSED
127
261
g41agepgdczekxg2mtw0dujsv* true 1.312GB 47 hours ago
0 commit comments