Add networking reference link

Co-authored-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Chris Chinchilla <chris.ward@docker.com>
This commit is contained in:
Chris Chinchilla 2023-04-06 11:49:46 +02:00 committed by Sebastiaan van Stijn
parent 21682ebd5c
commit 64e9cadd1c
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 13 additions and 1 deletions

View File

@ -29,7 +29,7 @@ Build an image from a Dockerfile
| `--label` | `list` | | Set metadata for an image | | `--label` | `list` | | Set metadata for an image |
| `-m`, `--memory` | `bytes` | `0` | Memory limit | | `-m`, `--memory` | `bytes` | `0` | Memory limit |
| `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap | | `--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 | | `--no-cache` | | | Do not use cache when building the image |
| `--platform` | `string` | | Set platform if server is multi-platform capable | | `--platform` | `string` | | Set platform if server is multi-platform capable |
| `--pull` | | | Always attempt to pull a newer version of the image | | `--pull` | | | Always attempt to pull a newer version of the image |
@ -630,6 +630,18 @@ On another machine:
$ docker build --cache-from myname/myapp . $ docker build --cache-from myname/myapp .
``` ```
### <a name="network"></a> 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 hosts network environment.
Find more details in the [Dockerfile documentation](https://docs.docker.com/engine/reference/builder/#run---network).
### <a name="squash"></a> Squash an image's layers (--squash) (experimental) ### <a name="squash"></a> Squash an image's layers (--squash) (experimental)
#### Overview #### Overview