Merge pull request #27702 from tonistiigi/net-builder0

add --network option for docker build
Upstream-commit: 62ff3e90835c3c572051afbbbac53303e57a5c89
Component: engine
This commit is contained in:
Sebastiaan van Stijn
2016-10-25 21:50:33 -07:00
committed by GitHub
11 changed files with 53 additions and 1 deletions

View File

@ -130,6 +130,7 @@ This section lists each version from latest to oldest. Each listing includes a
[Docker Remote API v1.25](docker_remote_api_v1.25.md) documentation
* `POST /build` accepts `networkmode` parameter to specify network used during build.
* `GET /images/(name)/json` now returns `OsVersion` if populated
* `GET /info` now returns `Isolation`.
* `POST /containers/create` now takes `AutoRemove` in HostConfig, to enable auto-removal of the container on daemon side when the container's process exits.

View File

@ -1788,6 +1788,11 @@ or being killed.
passing secret values. [Read more about the buildargs instruction](../../reference/builder.md#arg)
- **shmsize** - Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB.
- **labels** JSON map of string pairs for labels to set on the image.
- **networkmode** - Sets the networking mode for the run commands during
build. Supported standard values are: `bridge`, `host`, `none`, and
`container:<name|id>`. Any other value is taken as a custom network's
name to which this container should connect to.
**Request Headers**:

View File

@ -38,6 +38,13 @@ Options:
--label value Set metadata for an image (default [])
-m, --memory string Memory limit
--memory-swap string Swap limit equal to memory plus swap: '-1' to enable unlimited swap
--network string Set the networking mode for the run commands
during build.
'bridge': use default Docker bridge
'none': no networking
'container:<name|id>': reuse another container's network stack
'host': use the Docker host network stack
'<network-name>|<network-id>': connect to a user-defined network
--no-cache Do not use cache when building the image
--pull Always attempt to pull a newer version of the image
-q, --quiet Suppress the build output and print image ID on success