bake: add --var flag for setting variable values

This provides alternative way to set values for Bake
variables without adding them the global environment variables.
This can also be used then environment variable access
is disabled with BUILDX_BAKE_DISABLE_VARS_ENV_LOOKUP.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2026-01-15 23:17:28 -08:00
parent 88359c58a0
commit c5322ca727
8 changed files with 245 additions and 142 deletions
+1
View File
@@ -32,6 +32,7 @@ Build from a file
| [`--push`](#push) | `bool` | | Shorthand for `--set=*.output=type=registry`. Conditional. |
| [`--sbom`](#sbom) | `string` | | Shorthand for `--set=*.attest=type=sbom` |
| [`--set`](#set) | `stringArray` | | Override target value (e.g., `targetpattern.key=value`) |
| `--var` | `stringArray` | | Set a variable value (e.g., `name=value`) |
<!---MARKER_GEN_END-->