From b4f6b6d97035da7f3f1f1a37f6853b11dd6c7418 Mon Sep 17 00:00:00 2001 From: sandyskies Date: Sun, 6 Mar 2016 20:29:23 +0800 Subject: [PATCH] add --network option for docker build Signed-off-by: sandyskies Signed-off-by: Tonis Tiigi --- docs/reference/commandline/build.md | 7 +++++++ man/docker-build.1.md | 4 ++++ man/docker-run.1.md | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/reference/commandline/build.md b/docs/reference/commandline/build.md index f0627268a4..6c162a0710 100644 --- a/docs/reference/commandline/build.md +++ b/docs/reference/commandline/build.md @@ -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:': reuse another container's network stack + 'host': use the Docker host network stack + '|': 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 diff --git a/man/docker-build.1.md b/man/docker-build.1.md index fb7394e034..9dfa496f5b 100644 --- a/man/docker-build.1.md +++ b/man/docker-build.1.md @@ -22,6 +22,7 @@ docker-build - Build a new image from the source code at PATH [**-t**|**--tag**[=*[]*]] [**-m**|**--memory**[=*MEMORY*]] [**--memory-swap**[=*LIMIT*]] +[**--network**[=*"default"*]] [**--shm-size**[=*SHM-SIZE*]] [**--cpu-period**[=*0*]] [**--cpu-quota**[=*0*]] @@ -111,6 +112,9 @@ set as the **URL**, the repository is cloned locally and then sent as the contex `k` (kilobytes), `m` (megabytes), or `g` (gigabytes). If you don't specify a unit, `b` is used. Set LIMIT to `-1` to enable unlimited swap. +**--network**=*NETWORK* + + **--shm-size**=*SHM-SIZE* Size of `/dev/shm`. The format is ``. `number` must be greater than `0`. Unit is optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes), or `g` (gigabytes). If you omit the unit, the system uses bytes. diff --git a/man/docker-run.1.md b/man/docker-run.1.md index 51df3df153..a18bae469e 100644 --- a/man/docker-run.1.md +++ b/man/docker-run.1.md @@ -388,7 +388,7 @@ string name. The name is useful when defining links (see **--link**) (or any other place you need to identify a container). This works for both background and foreground Docker containers. -**--net**="*bridge*" +**--network**="*bridge*" Set the Network mode for the container 'bridge': create a network stack on the default Docker bridge 'none': no networking