mirror of https://github.com/docker/cli.git
add --network option for docker build
Signed-off-by: sandyskies <chenmingjie0828@163.com> Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
8f0be436cd
commit
b4f6b6d970
|
@ -38,6 +38,13 @@ Options:
|
||||||
--label value Set metadata for an image (default [])
|
--label value Set metadata for an image (default [])
|
||||||
-m, --memory string Memory limit
|
-m, --memory string Memory limit
|
||||||
--memory-swap string Swap limit equal to memory plus swap: '-1' to enable unlimited swap
|
--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
|
--no-cache Do not use cache when building the image
|
||||||
--pull Always attempt to pull a newer version of 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
|
-q, --quiet Suppress the build output and print image ID on success
|
||||||
|
|
|
@ -22,6 +22,7 @@ docker-build - Build a new image from the source code at PATH
|
||||||
[**-t**|**--tag**[=*[]*]]
|
[**-t**|**--tag**[=*[]*]]
|
||||||
[**-m**|**--memory**[=*MEMORY*]]
|
[**-m**|**--memory**[=*MEMORY*]]
|
||||||
[**--memory-swap**[=*LIMIT*]]
|
[**--memory-swap**[=*LIMIT*]]
|
||||||
|
[**--network**[=*"default"*]]
|
||||||
[**--shm-size**[=*SHM-SIZE*]]
|
[**--shm-size**[=*SHM-SIZE*]]
|
||||||
[**--cpu-period**[=*0*]]
|
[**--cpu-period**[=*0*]]
|
||||||
[**--cpu-quota**[=*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
|
`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.
|
unit, `b` is used. Set LIMIT to `-1` to enable unlimited swap.
|
||||||
|
|
||||||
|
**--network**=*NETWORK*
|
||||||
|
|
||||||
|
|
||||||
**--shm-size**=*SHM-SIZE*
|
**--shm-size**=*SHM-SIZE*
|
||||||
Size of `/dev/shm`. The format is `<number><unit>`. `number` must be greater than `0`.
|
Size of `/dev/shm`. The format is `<number><unit>`. `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.
|
Unit is optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes), or `g` (gigabytes). If you omit the unit, the system uses bytes.
|
||||||
|
|
|
@ -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
|
other place you need to identify a container). This works for both background
|
||||||
and foreground Docker containers.
|
and foreground Docker containers.
|
||||||
|
|
||||||
**--net**="*bridge*"
|
**--network**="*bridge*"
|
||||||
Set the Network mode for the container
|
Set the Network mode for the container
|
||||||
'bridge': create a network stack on the default Docker bridge
|
'bridge': create a network stack on the default Docker bridge
|
||||||
'none': no networking
|
'none': no networking
|
||||||
|
|
Loading…
Reference in New Issue