Skip to content

Commit 5fcac2c

Browse files
allencloudTibor Vass
authored andcommitted
better command docker network create -h output
Signed-off-by: allencloud <allen.sun@daocloud.io> (cherry picked from commit d0081a0) Signed-off-by: Tibor Vass <tibor@docker.com>
1 parent de2498d commit 5fcac2c

File tree

6 files changed

+22
-22
lines changed

6 files changed

+22
-22
lines changed

api/client/network/create.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ func newCreateCommand(dockerCli *client.DockerCli) *cobra.Command {
5353
flags.StringVarP(&opts.driver, "driver", "d", "bridge", "Driver to manage the Network")
5454
flags.VarP(&opts.driverOpts, "opt", "o", "Set driver specific options")
5555
flags.StringSliceVar(&opts.labels, "label", []string{}, "Set metadata on a network")
56-
flags.BoolVar(&opts.internal, "internal", false, "restricts external access to the network")
57-
flags.BoolVar(&opts.ipv6, "ipv6", false, "enable IPv6 networking")
56+
flags.BoolVar(&opts.internal, "internal", false, "Restrict external access to the network")
57+
flags.BoolVar(&opts.ipv6, "ipv6", false, "Enable IPv6 networking")
5858

5959
flags.StringVar(&opts.ipamDriver, "ipam-driver", "default", "IP Address Management Driver")
60-
flags.StringSliceVar(&opts.ipamSubnet, "subnet", []string{}, "subnet in CIDR format that represents a network segment")
61-
flags.StringSliceVar(&opts.ipamIPRange, "ip-range", []string{}, "allocate container ip from a sub-range")
62-
flags.StringSliceVar(&opts.ipamGateway, "gateway", []string{}, "ipv4 or ipv6 Gateway for the master subnet")
60+
flags.StringSliceVar(&opts.ipamSubnet, "subnet", []string{}, "Subnet in CIDR format that represents a network segment")
61+
flags.StringSliceVar(&opts.ipamIPRange, "ip-range", []string{}, "Allocate container ip from a sub-range")
62+
flags.StringSliceVar(&opts.ipamGateway, "gateway", []string{}, "IPv4 or IPv6 Gateway for the master subnet")
6363

64-
flags.Var(&opts.ipamAux, "aux-address", "auxiliary ipv4 or ipv6 addresses used by Network driver")
65-
flags.Var(&opts.ipamOpt, "ipam-opt", "set IPAM driver specific options")
64+
flags.Var(&opts.ipamAux, "aux-address", "Auxiliary IPv4 or IPv6 addresses used by Network driver")
65+
flags.Var(&opts.ipamOpt, "ipam-opt", "Set IPAM driver specific options")
6666

6767
return cmd
6868
}

docs/reference/commandline/network_create.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ Usage: docker network create [OPTIONS]
1616
Create a network
1717

1818
Options:
19-
--aux-address value auxiliary ipv4 or ipv6 addresses used by Network
19+
--aux-address value Auxiliary IPv4 or IPv6 addresses used by Network
2020
driver (default map[])
2121
-d, --driver string Driver to manage the Network (default "bridge")
22-
--gateway value ipv4 or ipv6 Gateway for the master subnet (default [])
22+
--gateway value IPv4 or IPv6 Gateway for the master subnet (default [])
2323
--help Print usage
24-
--internal restricts external access to the network
25-
--ip-range value allocate container ip from a sub-range (default [])
24+
--internal Restrict external access to the network
25+
--ip-range value Allocate container ip from a sub-range (default [])
2626
--ipam-driver string IP Address Management Driver (default "default")
27-
--ipam-opt value set IPAM driver specific options (default map[])
28-
--ipv6 enable IPv6 networking
27+
--ipam-opt value Set IPAM driver specific options (default map[])
28+
--ipv6 Enable IPv6 networking
2929
--label value Set metadata on a network (default [])
3030
-o, --opt value Set driver specific options (default map[])
31-
--subnet value subnet in CIDR format that represents a
31+
--subnet value Subnet in CIDR format that represents a
3232
network segment (default [])
3333
```
3434

@@ -163,9 +163,9 @@ network driver, again with their approximate equivalents to `docker daemon`.
163163

164164
| Argument | Equivalent | Description |
165165
|--------------|----------------|--------------------------------------------|
166-
| `--gateway` | - | ipv4 or ipv6 Gateway for the master subnet |
166+
| `--gateway` | - | IPv4 or IPv6 Gateway for the master subnet |
167167
| `--ip-range` | `--fixed-cidr` | Allocate IPs from a range |
168-
| `--internal` | - | Restricts external access to the network |
168+
| `--internal` | - | Restrict external access to the network |
169169
| `--ipv6` | `--ipv6` | Enable IPv6 networking |
170170
| `--subnet` | `--bip` | Subnet for network |
171171

experimental/vlan-networks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ root@3cce0d3575f3:/# ip -6 route
596596
default via 2001:db8:abc9::22 dev eth0 metric 1024
597597
```
598598

599-
Start a second container with a specific `--ip4` address and ping the first host using ipv4 packets:
599+
Start a second container with a specific `--ip4` address and ping the first host using IPv4 packets:
600600

601601
```
602602
docker run --net=ipvlan140 --ip=192.168.140.10 -it --rm alpine /bin/sh

man/docker-network-create.1.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,19 @@ to create an externally isolated `overlay` network, you can specify the
144144

145145
# OPTIONS
146146
**--aux-address**=map[]
147-
Auxiliary ipv4 or ipv6 addresses used by network driver
147+
Auxiliary IPv4 or IPv6 addresses used by network driver
148148

149149
**-d**, **--driver**=*DRIVER*
150150
Driver to manage the Network bridge or overlay. The default is bridge.
151151

152152
**--gateway**=[]
153-
ipv4 or ipv6 Gateway for the master subnet
153+
IPv4 or IPv6 Gateway for the master subnet
154154

155155
**--help**
156156
Print usage
157157

158158
**--internal**
159-
Restricts external access to the network
159+
Restrict external access to the network
160160

161161
**--ip-range**=[]
162162
Allocate container ip from a sub-range

pkg/discovery/backends.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func ParseAdvertise(advertise string) (string, error) {
5757
return advertise, nil
5858
}
5959

60-
// If advertise is a valid interface name, get the valid ipv4 address and use it to advertise
60+
// If advertise is a valid interface name, get the valid IPv4 address and use it to advertise
6161
ifaceName := addr
6262
iface, err = net.InterfaceByName(ifaceName)
6363
if err != nil {

runconfig/opts/opts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func doesEnvExist(name string) bool {
4747
}
4848

4949
// ValidateExtraHost validates that the specified string is a valid extrahost and returns it.
50-
// ExtraHost is in the form of name:ip where the ip has to be a valid ip (ipv4 or ipv6).
50+
// ExtraHost is in the form of name:ip where the ip has to be a valid ip (IPv4 or IPv6).
5151
func ValidateExtraHost(val string) (string, error) {
5252
// allow for IPv6 addresses in extra hosts by only splitting on first ":"
5353
arr := strings.SplitN(val, ":", 2)

0 commit comments

Comments
 (0)