Skip to content

Commit 313a0ae

Browse files
gloursaevesdocker
andauthored
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 <[email protected]> Co-authored-by: Allie Sadler <[email protected]>
1 parent db51090 commit 313a0ae

File tree

1 file changed

+12
-0
lines changed
  • content/manuals/compose/how-tos/multiple-compose-files

1 file changed

+12
-0
lines changed

content/manuals/compose/how-tos/multiple-compose-files/include.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,18 @@ services:
3636

3737
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.
3838

39+
```yaml
40+
include:
41+
- oci://docker.io/username/my-compose-app:latest # use a Compose file stored as an OCI artifact
42+
services:
43+
serviceA:
44+
build: .
45+
depends_on:
46+
- serviceB
47+
```
48+
`include` allows you to reference Compose files from remote sources, such as OCI artifacts or Git repositories.
49+
Here `serviceB` is defined in a Compose file stored on Docker Hub.
50+
3951
## Include and overrides
4052

4153
Compose reports an error if any resource from `include` conflicts with resources from the included Compose file. This rule prevents

0 commit comments

Comments
 (0)