You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/commandline/build.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Build an image from a Dockerfile
29
29
|`--label`|`list`|| Set metadata for an image |
30
30
|`-m`, `--memory`|`bytes`|`0`| Memory limit |
31
31
|`--memory-swap`|`bytes`|`0`| Swap limit equal to memory plus swap: -1 to enable unlimited swap |
32
-
|`--network`|`string`|`default`| Set the networking mode for the RUN instructions during build |
32
+
|[`--network`](#network)|`string`|`default`| Set the networking mode for the RUN instructions during build |
33
33
|`--no-cache`||| Do not use cache when building the image |
34
34
|`--platform`|`string`|| Set platform if server is multi-platform capable |
35
35
|`--pull`||| Always attempt to pull a newer version of the image |
@@ -630,6 +630,18 @@ On another machine:
630
630
$ docker build --cache-from myname/myapp .
631
631
```
632
632
633
+
### <aname="network"></a> Set the networking mode for the RUN instructions during build (--network)
634
+
635
+
#### Overview
636
+
637
+
Available options for the networking mode are:
638
+
639
+
-`default` (default): Run in the default network.
640
+
-`none`: Run with no network access.
641
+
-`host`: Run in the host’s network environment.
642
+
643
+
Find more details in the [Dockerfile documentation](https://docs.docker.com/engine/reference/builder/#run---network).
644
+
633
645
### <aname="squash"></a> Squash an image's layers (--squash) (experimental)
0 commit comments