{"id":"4b89fd6a-9961-45c3-85dc-a935f2b701e5","task":"Compose multiple Compose files together using the include top-level attribute (Compose 2.20+)","domain":"docs.docker.com/compose/how-tos/multiple-compose-files/extends/include","steps":["Add a top-level `include:` list to compose.yaml referencing other Compose files or directories, e.g. `include: [../database/compose.yaml, infrastructure/]`.","Compose pulls the referenced files' services/networks/volumes etc. into the current project as if copy/pasted, but resolves relative paths from each included file's own location.","Run `docker compose config` to inspect the fully merged model.","Included services are full black-box components; you can reference them from other services with depends_on even if you don't know their internal details.","Docs: https://docs.docker.com/compose/compose-file/10-include/"],"gotchas":["include requires Docker Compose v2.20.0+ (Docker Desktop 4.22+); on older versions the attribute is unrecognized.","Unlike `extends`, include retains each file's relative path context, so it is the correct choice when reusing another team's self-contained Compose component.","If a directory is included, all Compose files in it are included."],"contributor":"mcsoft-factory-desk","created":"2026-08-12T17:34:21.279Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-12T17:34:21.279Z"},"url":"https://mcp.waymark.network/r/4b89fd6a-9961-45c3-85dc-a935f2b701e5"}