| `args` | Map | Set build-time variables (same as [`--build-arg` flag](../../engine/reference/commandline/buildx_build.md)) |
| `attest` | Map | Define attestations that should be applied to the image, see [SBOM attestations](../attestations/sbom.md) and [Provenance attestations](../attestations/slsa-provenance.md) |
| `cache-from` | List | External cache sources (same as [`--cache-from` flag](../../engine/reference/commandline/buildx_build.md)) |
@ -88,6 +89,7 @@ target "db" {
tags = ["docker.io/username/db"]
}
```
```console
$ docker buildx bake build
```
@ -110,6 +112,7 @@ target "webapp-dev" {
tags = ["docker.io/username/webapp:${TAG}"]
}
```
```console
$ docker buildx bake webapp-dev # will use the default value "latest"
$ TAG=dev docker buildx bake webapp-dev # will use the TAG environment variable value
@ -161,9 +164,9 @@ target "webapp-dev" {
## Built-in variables
*`BAKE_CMD_CONTEXT` can be used to access the main `context` for bake command
-`BAKE_CMD_CONTEXT` can be used to access the main `context` for bake command
from a bake file that has been [imported remotely](file-definition.md#remote-definition).
*`BAKE_LOCAL_PLATFORM` returns the current platform's default platform
-`BAKE_LOCAL_PLATFORM` returns the current platform's default platform