Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(bake): automatically deduplicate context transfers #20612

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions content/manuals/build/bake/contexts.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,25 @@

## Deduplicate context transfer

> **Note**
>
> As of Buildx version 0.17.0 and later, Bake automatically deduplicates

Check failure on line 98 in content/manuals/build/bake/contexts.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'deduplicates'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'deduplicates'?", "location": {"path": "content/manuals/build/bake/contexts.md", "range": {"start": {"line": 98, "column": 61}}}, "severity": "ERROR"}
> context transfer for targets that share the same context. In addition to
> Buildx version 0.17.0, the builder must be running BuildKit version 0.16.0 or
> later, and the Dockerfile syntax must be `docker/dockerfile:1.10` or later.
>
> If you meet these requirements, you don't need to manually deduplicate

Check failure on line 103 in content/manuals/build/bake/contexts.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'deduplicate'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'deduplicate'?", "location": {"path": "content/manuals/build/bake/contexts.md", "range": {"start": {"line": 103, "column": 62}}}, "severity": "ERROR"}
> context transfer as described in this section.
>
> - To check your Buildx version, run `docker buildx version`.
> - To check your BuildKit version, run `docker buildx inspect --bootstrap` and
> look for the `BuildKit version` field.
> - To check your Dockerfile syntax version, check the `syntax`
> [parser directive](/reference/dockerfile.md#syntax) in your Dockerfile. If
> it's not present, the default version whatever comes bundled with your
> current version of BuildKit. To set the version explicitly, add
> `#syntax=docker/dockerfile:1.10` at the top of your Dockerfile.

When you build targets concurrently, using groups, build contexts are loaded
independently for each target. If the same context is used by multiple targets
in a group, that context is transferred once for each time it's used. This can
Expand Down
Loading