mirror of https://github.com/docker/docs.git
compose include - add an example using remote Compose file from an OCI artifact (#22950)
<!--Delete sections as needed --> ## Description Add an example using including a Compose file from an OCI artifact stored on Docker Hub ## Related issues or tickets Fix #22881 ## Reviews <!-- Notes for reviewers here --> <!-- List applicable reviews (optionally @tag reviewers) --> - [ ] Technical review - [x] Editorial review - [ ] Product review --------- Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com> Co-authored-by: Allie Sadler <102604716+aevesdocker@users.noreply.github.com>
This commit is contained in:
parent
db51090388
commit
313a0aedd8
|
|
@ -36,6 +36,18 @@ services:
|
|||
|
||||
This means the team managing `serviceB` can refactor its own database component to introduce additional services without impacting any dependent teams. It also means that the dependent teams don't need to include additional flags on each Compose command they run.
|
||||
|
||||
```yaml
|
||||
include:
|
||||
- oci://docker.io/username/my-compose-app:latest # use a Compose file stored as an OCI artifact
|
||||
services:
|
||||
serviceA:
|
||||
build: .
|
||||
depends_on:
|
||||
- serviceB
|
||||
```
|
||||
`include` allows you to reference Compose files from remote sources, such as OCI artifacts or Git repositories.
|
||||
Here `serviceB` is defined in a Compose file stored on Docker Hub.
|
||||
|
||||
## Include and overrides
|
||||
|
||||
Compose reports an error if any resource from `include` conflicts with resources from the included Compose file. This rule prevents
|
||||
|
|
|
|||
Loading…
Reference in New Issue