mirror of https://github.com/docker/cli.git
Merge pull request #4166 from ChrisChinchilla/chrisward/network-context
Add networking reference link
This commit is contained in:
commit
dd3ba7396d
|
@ -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 .
|
||||
```
|
||||
|
||||
### <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 host’s 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)
|
||||
|
||||
#### Overview
|
||||
|
|
Loading…
Reference in New Issue