From 64e9cadd1ce1ae3d0a20c525812d4ef48fb65f45 Mon Sep 17 00:00:00 2001 From: Chris Chinchilla Date: Thu, 6 Apr 2023 11:49:46 +0200 Subject: [PATCH] Add networking reference link Co-authored-by: Sebastiaan van Stijn Signed-off-by: Chris Chinchilla --- docs/reference/commandline/build.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/reference/commandline/build.md b/docs/reference/commandline/build.md index 5963d9bb2b..683d774224 100644 --- a/docs/reference/commandline/build.md +++ b/docs/reference/commandline/build.md @@ -29,7 +29,7 @@ Build an image from a Dockerfile | `--label` | `list` | | Set metadata for an image | | `-m`, `--memory` | `bytes` | `0` | Memory limit | | `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap | -| `--network` | `string` | `default` | Set the networking mode for the RUN instructions during build | +| [`--network`](#network) | `string` | `default` | Set the networking mode for the RUN instructions during build | | `--no-cache` | | | Do not use cache when building the image | | `--platform` | `string` | | Set platform if server is multi-platform capable | | `--pull` | | | Always attempt to pull a newer version of the image | @@ -630,6 +630,18 @@ On another machine: $ docker build --cache-from myname/myapp . ``` +### Set the networking mode for the RUN instructions during build (--network) + +#### Overview + +Available options for the networking mode are: + +- `default` (default): Run in the default network. +- `none`: Run with no network access. +- `host`: Run in the host’s network environment. + +Find more details in the [Dockerfile documentation](https://docs.docker.com/engine/reference/builder/#run---network). + ### Squash an image's layers (--squash) (experimental) #### Overview