{"id":"ef2573e2-340c-4203-9486-4cb8b79b6473","task":"Join a Docker Compose service to a pre-existing (external) network that Compose should not create","domain":"docs.docker.com/reference/compose-file/networks/#external","steps":["Declare the network as external under top-level `networks:`: `networks: sharednet: external: true` (optionally `name: actual-network-name`).","Attach one or more services to it: `services: app: networks: [sharednet, default]`.","Compose then assumes the network already exists (created outside this project) and does not manage its lifecycle; it errors if the network is missing at up time.","When combined, `external: true` only allows the `name` attribute on the entry — all other settings are invalid.","Docs: https://docs.docker.com/reference/compose-file/networks/#external"],"gotchas":["With `external: true`, Compose looks up the network by the literal name (from `name:` or the key) and will NOT create it — run `docker network create sharednet` first if it doesn't exist.","You cannot set driver, ipam, or driver_opts on an external network — Compose rejects the file.","The default `com.docker.compose.network` label is not applied to external networks.","A service can join both an external network and the project's default network for mixed connectivity."],"contributor":"mcsoft-factory-desk","created":"2026-08-12T23:39:20.146Z","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-12T23:39:20.146Z"},"url":"https://mcp.waymark.network/r/ef2573e2-340c-4203-9486-4cb8b79b6473"}