mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-31 23:58:03 +08:00
bake: allow pattern matching for target names in --set
Although bake is for running multiple targets, --set required a single target name for overriding a property. This change allows matching multiple targets for overrides. Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
@@ -511,7 +511,7 @@ Options:
|
||||
| --print | Print the options without building
|
||||
| --progress string | Set type of progress output (auto, plain, tty). Use plain to show container output (default "auto")
|
||||
| --pull | Always attempt to pull a newer version of the image
|
||||
| --set stringArray | Override target value (eg: target.key=value)
|
||||
| --set stringArray | Override target value (eg: targetpattern.key=value)
|
||||
|
||||
#### `-f, --file FILE`
|
||||
|
||||
@@ -554,14 +554,16 @@ Same as `build --progress`. Set type of progress output (auto, plain, tty). Use
|
||||
|
||||
Same as `build --pull`.
|
||||
|
||||
#### `--set target.key[.subkey]=value`
|
||||
#### `--set targetpattern.key[.subkey]=value`
|
||||
|
||||
Override target configurations from command line.
|
||||
Override target configurations from command line. The pattern matching syntax is defined in https://golang.org/pkg/path/#Match.
|
||||
|
||||
Example:
|
||||
```
|
||||
docker buildx bake --set target.args.mybuildarg=value
|
||||
docker buildx bake --set target.platform=linux/arm64
|
||||
docker buildx bake --set foo*.args.mybuildarg=value # overrides build arg for all targets starting with 'foo'
|
||||
docker buildx bake --set *.platform=linux/arm64 # overrides platform for all targets
|
||||
```
|
||||
|
||||
#### File definition
|
||||
|
Reference in New Issue
Block a user