Explorar o código

Add docs for --ipv6 option, also add --internal as appropriate

Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Aidan Hobson Sayers %!s(int64=9) %!d(string=hai) anos
pai
achega
d736a9d2c3

+ 1 - 1
api/client/network.go

@@ -50,7 +50,7 @@ func (cli *DockerCli) CmdNetworkCreate(args ...string) error {
 	cmd.Var(flIpamOpt, []string{"-ipam-opt"}, "set IPAM driver specific options")
 
 	flInternal := cmd.Bool([]string{"-internal"}, false, "restricts external access to the network")
-	flIPv6 := cmd.Bool([]string{"-ipv6"}, false, "enables IPv6 on the network")
+	flIPv6 := cmd.Bool([]string{"-ipv6"}, false, "enable IPv6 networking")
 
 	cmd.Require(flag.Exact, 1)
 	err := cmd.ParseFlags(args, true)

+ 2 - 2
contrib/completion/bash/docker

@@ -1275,7 +1275,7 @@ _docker_network_connect() {
 
 _docker_network_create() {
 	case "$prev" in
-		--aux-address|--gateway|--ip-range|--ipam-opt|--opt|-o|--subnet)
+		--aux-address|--gateway|--internal|--ip-range|--ipam-opt|--ipv6|--opt|-o|--subnet)
 			return
 			;;
 		--ipam-driver)
@@ -1294,7 +1294,7 @@ _docker_network_create() {
 
 	case "$cur" in
 		-*)
-			COMPREPLY=( $( compgen -W "--aux-address --driver -d --gateway --help --internal --ip-range --ipam-driver --ipam-opt --opt -o --subnet" -- "$cur" ) )
+			COMPREPLY=( $( compgen -W "--aux-address --driver -d --gateway --help --internal --ip-range --ipam-driver --ipam-opt --ipv6 --opt -o --subnet" -- "$cur" ) )
 			;;
 	esac
 }

+ 1 - 0
contrib/completion/zsh/_docker

@@ -332,6 +332,7 @@ __docker_network_subcommand() {
                 "($help)*--ip-range=[Allocate container ip from a sub-range]:IP/mask: " \
                 "($help)--ipam-driver=[IP Address Management Driver]:driver:(default)" \
                 "($help)*--ipam-opt=[Set custom IPAM plugin options]:opt=value: " \
+                "($help)--ipv6[Enable IPv6 networking]" \
                 "($help)*"{-o=,--opt=}"[Set driver specific options]:opt=value: " \
                 "($help)*--subnet=[Subnet in CIDR format that represents a network segment]:IP/mask: " \
                 "($help -)1:Network Name: " && ret=0

+ 8 - 1
docs/reference/commandline/network_create.md

@@ -22,6 +22,7 @@ parent = "smn_cli"
     --ip-range=[]            Allocate container ip from a sub-range
     --ipam-driver=default    IP Address Management Driver
     --ipam-opt=map[]         Set custom IPAM driver specific options
+    --ipv6                   Enable IPv6 networking
     -o --opt=map[]           Set custom driver specific options
     --subnet=[]              Subnet in CIDR format that represents a network segment
 
@@ -134,7 +135,13 @@ The following are those options and the equivalent docker daemon flags used for
 | `com.docker.network.bridge.enable_icc`           | `--icc`     | Enable or Disable Inter Container Connectivity        |
 | `com.docker.network.bridge.host_binding_ipv4`    | `--ip`      | Default IP when binding container ports               |
 | `com.docker.network.mtu`                         | `--mtu`     | Set the containers network MTU                        |
-| `com.docker.network.enable_ipv6`                 | `--ipv6`    | Enable IPv6 networking                                |
+
+The following arguments can be passed to `docker network create` for any network driver.
+
+| Argument     | Equivalent | Description                              |
+|--------------|------------|------------------------------------------|
+| `--internal` | -          | Restricts external access to the network |
+| `--ipv6`     | `--ipv6`   | Enable IPv6 networking                   |
 
 For example, let's use `-o` or `--opt` options to specify an IP address binding when publishing ports:
 

+ 7 - 1
docs/userguide/networking/work-with-networks.md

@@ -111,7 +111,13 @@ The following are those options and the equivalent docker daemon flags used for
 | `com.docker.network.bridge.enable_icc`           | `--icc`     | Enable or Disable Inter Container Connectivity        |
 | `com.docker.network.bridge.host_binding_ipv4`    | `--ip`      | Default IP when binding container ports               |
 | `com.docker.network.mtu`                         | `--mtu`     | Set the containers network MTU                        |
-| `com.docker.network.enable_ipv6`                 | `--ipv6`    | Enable IPv6 networking                                |
+
+The following arguments can be passed to `docker network create` for any network driver.
+
+| Argument     | Equivalent | Description                              |
+|--------------|------------|------------------------------------------|
+| `--internal` | -          | Restricts external access to the network |
+| `--ipv6`     | `--ipv6`   | Enable IPv6 networking                   |
 
 For example, now let's use `-o` or `--opt` options to specify an IP address binding when publishing ports:
 

+ 4 - 0
man/docker-network-create.1.md

@@ -14,6 +14,7 @@ docker-network-create - create a new network
 [**--ip-range**=*[]*]
 [**--ipam-driver**=*default*]
 [**--ipam-opt**=*map[]*]
+[**--ipv6**]
 [**-o**|**--opt**=*map[]*]
 [**--subnet**=*[]*]
 NETWORK-NAME
@@ -152,6 +153,9 @@ If you want to create an externally isolated `overlay` network, you can specify
 **--ipam-opt**=map[]
   Set custom IPAM driver options
 
+**--ipv6**
+  Enable IPv6 networking
+
 **-o**, **--opt**=map[]
   Set custom driver options