Skip to content

Commit 844ac05

Browse files
committed
build(bake): automatically deduplicate context transfers
Signed-off-by: David Karlsson <[email protected]>
1 parent df66fbd commit 844ac05

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

content/manuals/build/bake/contexts.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,25 @@ multiple Dockerfiles that can't be easily merged into one.
9393

9494
## Deduplicate context transfer
9595

96+
> **Note**
97+
>
98+
> As of Buildx version 0.17.0 and later, Bake automatically deduplicates
99+
> context transfer for targets that share the same context. In addition to
100+
> Buildx version 0.17.0, the builder must be running BuildKit version 0.16.0 or
101+
> later, and the Dockerfile syntax must be `docker/dockerfile:1.10` or later.
102+
>
103+
> If you meet these requirements, you don't need to manually deduplicate
104+
> context transfer as described in this section.
105+
>
106+
> - To check your Buildx version, run `docker buildx version`.
107+
> - To check your BuildKit version, run `docker buildx inspect --bootstrap` and
108+
> look for the `BuildKit version` field.
109+
> - To check your Dockerfile syntax version, check the `syntax`
110+
> [parser directive](/reference/dockerfile.md#syntax) in your Dockerfile. If
111+
> it's not present, the default version whatever comes bundled with your
112+
> current version of BuildKit. To set the version explicitly, add
113+
> `#syntax=docker/dockerfile:1.10` at the top of your Dockerfile.
114+
96115
When you build targets concurrently, using groups, build contexts are loaded
97116
independently for each target. If the same context is used by multiple targets
98117
in a group, that context is transferred once for each time it's used. This can

0 commit comments

Comments
 (0)