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

support additional_context reference to another service #12485

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Jan 22, 2025

  • classic builder doesn't support additional context
  • buildkit builder detects service: prefix in contexts and builds images in order (in addition to runtime dependencies, to preserve backward compatibility)
  • bake builder delegates to buildx bake with a named context for service's target
$ COMPOSE_BAKE=false docker compose build
INFO[0000] additional_context with "service:"" is better supported when delegating build go bake. Set COMPOSE_BAKE=true 
[+] Building 2.0s (16/16) FINISHED                                                                                                       docker:desktop-linux
 => [a internal] load build definition from Dockerfile.a                                                                                                 0.0s
...
 => => naming to docker.io/library/b:latest                                                                                                              0.0s
 => => unpacking to docker.io/library/b:latest                                                                                                           0.0s
 => [b] resolving provenance for metadata file                                                                                                           0.0s
[+] Building 2/2
 ✔ a  Built                                                                                                                                              0.0s 
 ✔ b  Built  

@ndeloof ndeloof force-pushed the additional_context_service branch from 4cb2c64 to d72476b Compare January 22, 2025 13:48
@ndeloof ndeloof force-pushed the additional_context_service branch from d72476b to 5e03fce Compare January 22, 2025 14:56
@ndeloof ndeloof requested a review from glours January 29, 2025 08:09
@ndeloof ndeloof force-pushed the additional_context_service branch 3 times, most recently from 7da851b to 97f81c7 Compare January 31, 2025 14:00
@ndeloof ndeloof marked this pull request as ready for review January 31, 2025 14:01
@ndeloof ndeloof requested a review from a team as a code owner January 31, 2025 14:01
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof ndeloof force-pushed the additional_context_service branch from 97f81c7 to aec31d9 Compare January 31, 2025 16:14
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.

1 participant