docs/content/reference/compose-file
Etienne Guerlain 1278c5b4c8
Update example in the Compose Build Specification (additional_contexts) to ease it's understanding (#22140)
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

<!-- Notes for reviewers here -->
<!-- List applicable reviews (optionally @tag reviewers) -->

- [ ] Technical review
- [ ] Editorial review
- [ ] Product review
2025-03-03 09:46:09 +00:00
..
_index.md add aliases for 404s (#21945) 2025-01-31 14:10:10 -08:00
build.md Update example in the Compose Build Specification (additional_contexts) to ease it's understanding (#22140) 2025-03-03 09:46:09 +00:00
configs.md fix: update include.html for heading error (#21906) 2025-01-29 07:31:40 -08:00
deploy.md fix: update include.html for heading error (#21906) 2025-01-29 07:31:40 -08:00
develop.md chore: summary bar cleanup (#21887) 2025-01-30 07:54:26 -08:00
extension.md fix: update include.html for heading error (#21906) 2025-01-29 07:31:40 -08:00
fragments.md fix: update include.html for heading error (#21906) 2025-01-29 07:31:40 -08:00
include.md chore: summary bar cleanup (#21887) 2025-01-30 07:54:26 -08:00
interpolation.md fix: update include.html for heading error (#21906) 2025-01-29 07:31:40 -08:00
legacy-versions.md hugo: move manuals content to /manuals section 2024-09-09 10:51:09 +02:00
merge.md docs: grammar and spelling fixes (#22136) 2025-02-28 14:13:37 -08:00
networks.md Merge pull request #22089 from aevesdocker/ENGDOCS-2437 2025-02-24 15:32:37 +00:00
profiles.md ENGDOCS-2228 (#20940) 2024-09-19 16:22:09 +01:00
secrets.md ENGDOCS-2365 (#21728) 2025-01-08 08:23:45 +00:00
services.md Merge pull request #22089 from aevesdocker/ENGDOCS-2437 2025-02-24 15:32:37 +00:00
version-and-name.md ENGDOCS-2228 (#20940) 2024-09-19 16:22:09 +01:00
volumes.md fix: update include.html for heading error (#21906) 2025-01-29 07:31:40 -08:00