-
Notifications
You must be signed in to change notification settings - Fork 545
compose: add support for referencing other services in additional_contexts
#3074
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
Comments
@crazy-max Can you check this? This should be supported. |
We support additional contexts since Buildx v0.11.0: Lines 92 to 96 in e0c67bf
I guess you mean this part: I tried to use this compose example from the docs: services:
base:
build:
context: .
dockerfile_inline: |
FROM alpine
RUN echo foo
my-service:
build:
context: .
dockerfile_inline: |
FROM base
RUN echo bar
additional_contexts:
base: service:base But it fails because it exports
And looking at the first info message:
Delegating to bake should work. |
With changes from compose-spec/compose-go#729 I think we need to adapt
|
.. and https://github.com/docker/compose/blob/main/pkg/compose/build_bake.go#L337-L338 for bake integration |
That would not work. The design of linked targets in bake is that dependencies can be linked lazily and then all the targets built together in parallel. Local images names are only for Docker driver. If you replace |
@tonistiigi this one is for direct buildkit execution, bake integration uses |
Many thanks to all! |
Description
See the last paragraph in https://docs.docker.com/reference/compose-file/build/#additional_contexts
This got added in compose-spec/compose-go#729 and docker-compose, but buildx is missing support.
The text was updated successfully, but these errors were encountered: