← All notes

Compose networks: let services reach each other by name

Answer: Networks let services communicate with each other.

Named networks

The top-level networks element lets you configure named networks.

Those named networks can be reused across multiple services.

You must explicitly grant each service access with the networks attribute.

If external is true, this network's lifecycle is maintained outside Compose.

The default network

By default Compose sets up a single network for your app.

Containers stay reachable by other containers on that network.

Each container for a service joins the default network.

Those containers are reachable by other containers on that network.

They are also discoverable by the service's name.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker Docs, Define and manage networks in Docker Compose; Docker documentation source, Compose networks (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Docker Docs, Define and manage networks in Docker Compose; Docker documentation source, Compose networks (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc.

Cite this

Permanent ID: iil:note:jm8r5xg9

iinventedlight. 2026. "Compose networks: let services reach each other by name." iinventedlight Library, iil:note:jm8r5xg9, version of 2026-11-24. https://iinventedlight.com/library/notes/docker-compose-networks/. License: CC-BY-4.0.

@misc{iil_note_jm8r5xg9,
  author = {{iinventedlight}},
  title = {{Compose networks: let services reach each other by name}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-24},
  url = {https://iinventedlight.com/library/notes/docker-compose-networks/},
  note = {Permanent ID iil:note:jm8r5xg9. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/docker-compose-networks.md.