Update example in the Compose Build Specification (additional_contexts) to ease it's understanding #22140
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 keybase
is used twice. Of course, any better replacement could be used, instead ofmy-service
.It is invalid to use the same key twice (the error:
mapping key "base" already defined at line 2
is expected ondocker 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