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

allow additional_context to target another service #729

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

ndeloof
Copy link
Collaborator

@ndeloof ndeloof commented Jan 22, 2025

Introduce support for service:xx syntax defining an additional context.

this will be used to explicitly request another service image being used as source for another service. This is a long term issue inherited from compose v1 sequential build logic: some users declare image built by another service as FROM instruction in another service's Dockerfile. They will be able to keep this working by adding an explicit additional_context as service: baseapp and let buildkit manage best possible execution of the build.

see https://github.com/docker/buildx/blob/v0.8.0-rc1/docs/reference/buildx_bake.md#using-a-result-of-one-target-as-a-base-image-in-another-target

illustration with docker/compose : docker/compose#12485

@ndeloof ndeloof requested a review from glours January 22, 2025 13:52
@ndeloof
Copy link
Collaborator Author

ndeloof commented Jan 22, 2025

cc @crazy-max

@ndeloof ndeloof marked this pull request as ready for review January 24, 2025 13:21
@ndeloof ndeloof force-pushed the additional_context_service branch from 25e1083 to f42e1a3 Compare January 24, 2025 13:21
Copy link
Collaborator

@glours glours left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me

@ndeloof ndeloof merged commit 77ab539 into main Jan 30, 2025
15 checks passed
@ndeloof ndeloof deleted the additional_context_service branch January 30, 2025 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants