@@ -93,7 +93,8 @@ options:
93
93
- option : load
94
94
value_type : bool
95
95
default_value : " false"
96
- description : Shorthand for `--set=*.output=type=docker`
96
+ description : Shorthand for `--set=*.output=type=docker`. Conditional.
97
+ details_url : ' #load'
97
98
deprecated : false
98
99
hidden : false
99
100
experimental : false
@@ -136,7 +137,7 @@ options:
136
137
value_type : string
137
138
default_value : auto
138
139
description : |
139
- Set type of progress output (`auto`, `quiet `, `plain`, `tty `, `rawjson`). Use plain to show container output
140
+ Set type of progress output (`auto`, `none `, `plain`, `quiet `, `rawjson`, `tty `). Use plain to show container output
140
141
details_url : ' #progress'
141
142
deprecated : false
142
143
hidden : false
@@ -168,7 +169,8 @@ options:
168
169
- option : push
169
170
value_type : bool
170
171
default_value : " false"
171
- description : Shorthand for `--set=*.output=type=registry`
172
+ description : Shorthand for `--set=*.output=type=registry`. Conditional.
173
+ details_url : ' #push'
172
174
deprecated : false
173
175
hidden : false
174
176
experimental : false
@@ -233,7 +235,7 @@ examples: |-
233
235
privileges.
234
236
235
237
In addition to BuildKit's `network.host` and `security.insecure` entitlements
236
- (see [`docker buildx build --allow`](/reference/cli/docker/buildx/build/#allow),
238
+ (see [`docker buildx build --allow`](/reference/cli/docker/buildx/build/#allow)) ,
237
239
Bake supports file system entitlements that grant granular control over file
238
240
system access. These are particularly useful when working with builds that need
239
241
access to files outside the default working directory.
@@ -388,6 +390,47 @@ examples: |-
388
390
$ docker buildx bake --list=type=targets,format=json
389
391
```
390
392
393
+ ### Load images into Docker (--load) {#load}
394
+
395
+ The `--load` flag is a convenience shorthand for adding an image export of type
396
+ `docker`:
397
+
398
+ ```console
399
+ --load ≈ --set=*.output=type=docker
400
+ ```
401
+
402
+ However, its behavior is conditional:
403
+
404
+ - If the build definition has no output defined, `--load` adds
405
+ `type=docker`.
406
+ - If the build definition’s outputs are `docker`, `image`, `registry`,
407
+ `oci`, `--load` will add a `type=docker` export if one is not already present.
408
+ - If the build definition contains `local` or `tar` outputs,
409
+ `--load` does nothing. It will not override those outputs.
410
+
411
+ For example, with the following bake file:
412
+
413
+ ```hcl
414
+ target "default" {
415
+ output = ["type=tar,dest=hi.tar"]
416
+ }
417
+ ```
418
+
419
+ With `--load`:
420
+
421
+ ```console
422
+ $ docker buildx bake --load --print
423
+ ...
424
+ "output": [
425
+ {
426
+ "dest": "hi.tar"
427
+ "type": "tar",
428
+ }
429
+ ]
430
+ ```
431
+
432
+ The `tar` output remains unchanged.
433
+
391
434
### Write build results metadata to a file (--metadata-file) {#metadata-file}
392
435
393
436
Similar to [`buildx build --metadata-file`](/reference/cli/docker/buildx/build/#metadata-file) but
@@ -507,6 +550,14 @@ examples: |-
507
550
508
551
Same as `build --pull`.
509
552
553
+ ### Push images to a registry (--push) {#push}
554
+
555
+ The `--push` flag follows the same logic as `--load`:
556
+
557
+ - If no outputs are defined, it adds a `type=image,push=true` export.
558
+ - For existing `image` outputs, it sets `push=true`.
559
+ - If outputs are set to `local` or `tar`, it does not override them.
560
+
510
561
### Create SBOM attestations (--sbom) {#sbom}
511
562
512
563
Same as [`build --sbom`](/reference/cli/docker/buildx/build/#sbom).
0 commit comments