From 2b991cb800536fe3e4eb7d65397d24df4e2fd53f Mon Sep 17 00:00:00 2001 From: aevesdocker Date: Wed, 10 Sep 2025 15:19:41 +0100 Subject: [PATCH 1/2] docs: add variable attribute Signed-off-by: aevesdocker --- docs/bake-reference.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/bake-reference.md b/docs/bake-reference.md index af8cddfc7..f90832955 100644 --- a/docs/bake-reference.md +++ b/docs/bake-reference.md @@ -1099,6 +1099,7 @@ or interpolate them in attribute values in your Bake file. variable "TAG" { type = string default = "latest" + description: "Tag to use for build" } target "webapp-dev" { @@ -1111,6 +1112,8 @@ You can assign a default value for a variable in the Bake file, or assign a `null` value to it. If you assign a `null` value, Buildx uses the default value from the Dockerfile instead. +You can also add a description of the variables purpose with the `description` field. This attribute is useful when combined with the `docker buildx bake --list=variables` option, providing a more informative output when listing the available variables in a Bake file. + You can override variable defaults set in the Bake file using environment variables. The following example sets the `TAG` variable to `dev`, overriding the default `latest` value shown in the previous example. From 983716a198085bfb4c8dd87e47fe7d20bb9a2b94 Mon Sep 17 00:00:00 2001 From: aevesdocker Date: Wed, 10 Sep 2025 15:22:41 +0100 Subject: [PATCH 2/2] grammar Signed-off-by: aevesdocker --- docs/bake-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/bake-reference.md b/docs/bake-reference.md index f90832955..676fcb99f 100644 --- a/docs/bake-reference.md +++ b/docs/bake-reference.md @@ -1112,7 +1112,7 @@ You can assign a default value for a variable in the Bake file, or assign a `null` value to it. If you assign a `null` value, Buildx uses the default value from the Dockerfile instead. -You can also add a description of the variables purpose with the `description` field. This attribute is useful when combined with the `docker buildx bake --list=variables` option, providing a more informative output when listing the available variables in a Bake file. +You can also add a description of the variable's purpose with the `description` field. This attribute is useful when combined with the `docker buildx bake --list=variables` option, providing a more informative output when listing the available variables in a Bake file. You can override variable defaults set in the Bake file using environment variables. The following example sets the `TAG` variable to `dev`,