diff --git a/content/build/bake/build-contexts.md b/content/build/bake/contexts.md similarity index 92% rename from content/build/bake/build-contexts.md rename to content/build/bake/contexts.md index 75d8a3eede..8b2744cd28 100644 --- a/content/build/bake/build-contexts.md +++ b/content/build/bake/contexts.md @@ -1,11 +1,12 @@ --- -title: Defining additional build contexts and linking targets +title: Using Bake with additional contexts description: | Additional contexts are useful when you want to pin image versions, or reference the output of other targets keywords: build, buildx, bake, buildkit, hcl aliases: - /build/customize/bake/build-contexts/ + - /build/bake/build-contexts/ --- In addition to the main `context` key that defines the build context, each @@ -60,9 +61,9 @@ target "app" { } ``` -## Using a result of one target as a base image in another target +## Using a target as a build context -To use a result of one target as a build context of another, specity the target +To use a result of one target as a build context of another, specify the target name with `target:` prefix. ```dockerfile diff --git a/content/build/release-notes.md b/content/build/release-notes.md index 83c2916701..7a334495aa 100644 --- a/content/build/release-notes.md +++ b/content/build/release-notes.md @@ -605,7 +605,7 @@ For more details, see the complete release notes in the [Buildx GitHub repositor - Build command now accepts `--build-context` flag to [define additional named build contexts](/reference/cli/docker/buildx/build/#build-context) for your builds. [docker/buildx#904](https://github.com/docker/buildx/issues/904) -- Bake definitions now support [defining dependencies between targets](bake/build-contexts.md) +- Bake definitions now support [defining dependencies between targets](bake/contexts.md) and using the result of one target in another build. [docker/buildx#928](https://github.com/docker/buildx/issues/928), [docker/buildx#965](https://github.com/docker/buildx/issues/965), diff --git a/data/toc.yaml b/data/toc.yaml index 7460eef4fd..065cf3f121 100644 --- a/data/toc.yaml +++ b/data/toc.yaml @@ -1965,12 +1965,12 @@ Manuals: title: Functions - path: /build/bake/matrices/ title: Matrices + - path: /build/bake/contexts/ + title: Contexts - path: /build/bake/overrides/ title: Overriding configuration - path: /build/bake/reference/ title: Bake file reference - - path: /build/bake/build-contexts/ - title: Build contexts and linking targets - path: /build/bake/compose-file/ title: Building from Compose file - path: /build/bake/remote-definition/