Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions content/reference/compose-file/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,7 @@ If either is omitted, Compose automatically generates the environment variable n

`network_mode` sets a service container's network mode.

- `bridge`: Connects the container to the host's default bridge network instead of creating a project-specific network.
- `none`: Turns off all container networking.
- `host`: Gives the container raw access to the host's network interface.
- `service:{name}`: Gives the container access to the specified container by referring to its service name.
Expand All @@ -1342,6 +1343,7 @@ If either is omitted, Compose automatically generates the environment variable n
For more information container networks, see the [Docker Engine documentation](/manuals/engine/network/_index.md#container-networks).

```yml
network_mode: "bridge"
network_mode: "host"
network_mode: "none"
network_mode: "service:[service name]"
Expand Down