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

Update example in the Compose Build Specification (additional_contexts) to ease it's understanding #22140

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

eguerlain
Copy link
Contributor

There might by a slight error when illustrating the additional_contexts attribute. The compose file declares two services with the same name. It might induce misunderstanding, especially since the second service's image uses the first one to build upon.

Description

I replaced the key defining the second service of the compose file used to illustrate the additional_contexts attribute, since the key base is used twice. Of course, any better replacement could be used, instead of my-service.

It is invalid to use the same key twice (the error: mapping key "base" already defined at line 2 is expected on docker compose up), and it does harm the understanding of the illustrated point of building a service's image using another one to share layers.

Reviews

  • Technical review
  • Editorial review
  • Product review

There might by a slight error when illustrating the `additional_contexts` attribute. The compose file declares two services with the same name.
It might induce misunderstanding, especially since the second service's image uses the first one to build upon.
@github-actions github-actions bot added the area/compose Relates to docker-compose.yml spec or docker-compose binary label Mar 1, 2025
Copy link

netlify bot commented Mar 1, 2025

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit f52da04
🔍 Latest deploy log https://app.netlify.com/sites/docsdocker/deploys/67c30e4664a36d00082c08eb
😎 Deploy Preview https://deploy-preview-22140--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@aevesdocker aevesdocker left a comment

Choose a reason for hiding this comment

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

Thanks for catching this @eguerlain

@aevesdocker aevesdocker merged commit 1278c5b into docker:main Mar 3, 2025
14 checks passed
@eguerlain eguerlain deleted the patch-fix-example-illustration branch March 3, 2025 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/compose Relates to docker-compose.yml spec or docker-compose binary
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants