Skip to content

Add support for build additional_contexts to reference other service targets #10834

Open

Description

Description

I'd like to be able to reference other services stages in a service's build contexts.

This is possible using buildx bake's contexts support for another bake target, but doesn't appear to be implemented yet in compose yet, but build.additional_contexts exists for other context types.

example:

service:
  console:
     build:
       context: ./docker/console
  app:
    build:
      context: ./docker/app
      additional_contexts:
        src: service:console

should provide the console build's target to app as src context.

To make this clear, service:console isn't supported currently by additional_contexts, it's what I'm asking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions