Skip to content

Commit d105e54

Browse files
authored
docs: say build.network is a mode, not a Compose network (docker#25881)
build.network was showing `custom_network_1`, which looks like a user-defined Compose network. it's the RUN networking mode (`default` / `none` / `host`), same as `docker build --network`. @netlify /reference/compose-file/build/ Fixes docker#21982 Signed-off-by: Dean Chen <862469039@qq.com>
1 parent da6063f commit d105e54

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

content/reference/compose-file/build.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -348,21 +348,19 @@ build:
348348

349349
### `network`
350350

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

353-
```yaml
354-
build:
355-
context: .
356-
network: host
357-
```
355+
The value is a mode (`default`, `none`, or `host`), not a network name:
358356

359357
```yaml
360358
build:
361359
context: .
362-
network: custom_network_1
360+
network: host
363361
```
364362

365-
Use `none` to disable networking during build:
363+
Use `none` to disable networking during the build:
366364

367365
```yaml
368366
build:

0 commit comments

Comments
 (0)