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
14 changes: 6 additions & 8 deletions content/reference/compose-file/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,21 +348,19 @@ build:

### `network`

Set the network containers connect to for the `RUN` instructions during build.
Set the networking mode for `RUN` instructions during the build. This is
the same as [`docker build --network`](/reference/cli/docker/buildx/build/#network).
It is not a Compose network from the top-level [`networks`](networks.md) key.

```yaml
build:
context: .
network: host
```
The value is a mode (`default`, `none`, or `host`), not a network name:

```yaml
build:
context: .
network: custom_network_1
network: host
```

Use `none` to disable networking during build:
Use `none` to disable networking during the build:

```yaml
build:
Expand Down