Require listen address and advertise address to be an IP address or an interface name

Hostnames are not supported for now because libnetwork can't use them
for overlay networking yet.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
Aaron Lehmann 2016-07-21 10:40:19 -07:00 committed by Tibor Vass
parent 18cd5ac352
commit 1918ec3987
3 changed files with 10 additions and 10 deletions

View File

@ -17,13 +17,13 @@ Usage: docker swarm init [OPTIONS]
Initialize a swarm Initialize a swarm
Options: Options:
--advertise-addr value Advertised address (format: <ip|hostname|interface>[:port]) --advertise-addr value Advertised address (format: <ip|interface>[:port])
--cert-expiry duration Validity period for node certificates (default 2160h0m0s) --cert-expiry duration Validity period for node certificates (default 2160h0m0s)
--dispatcher-heartbeat duration Dispatcher heartbeat period (default 5s) --dispatcher-heartbeat duration Dispatcher heartbeat period (default 5s)
--external-ca value Specifications of one or more certificate signing endpoints --external-ca value Specifications of one or more certificate signing endpoints
--force-new-cluster Force create a new cluster from current state. --force-new-cluster Force create a new cluster from current state.
--help Print usage --help Print usage
--listen-addr value Listen address (format: <ip|hostname|interface>[:port]) --listen-addr value Listen address (format: <ip|interface>[:port])
--task-history-limit int Task history retention limit (default 5) --task-history-limit int Task history retention limit (default 5)
``` ```
@ -79,7 +79,7 @@ The node listens for inbound Swarm manager traffic on this address. The default
0.0.0.0:2377. It is also possible to specify a network interface to listen on that interface's 0.0.0.0:2377. It is also possible to specify a network interface to listen on that interface's
address; for example `--listen-addr eth0:2377`. address; for example `--listen-addr eth0:2377`.
Specifying a port is optional. If the value is a bare IP address, hostname, or interface Specifying a port is optional. If the value is a bare IP address or interface
name, the default port 2377 will be used. name, the default port 2377 will be used.
### `--advertise-addr value` ### `--advertise-addr value`
@ -94,7 +94,7 @@ inter-manager communication and overlay networking.
It is also possible to specify a network interface to advertise that interface's address; It is also possible to specify a network interface to advertise that interface's address;
for example `--advertise-addr eth0:2377`. for example `--advertise-addr eth0:2377`.
Specifying a port is optional. If the value is a bare IP address, hostname, or interface Specifying a port is optional. If the value is a bare IP address or interface
name, the default port 2377 will be used. name, the default port 2377 will be used.
### `--task-history-limit` ### `--task-history-limit`

View File

@ -17,9 +17,9 @@ Usage: docker swarm join [OPTIONS] HOST:PORT
Join a swarm as a node and/or manager Join a swarm as a node and/or manager
Options: Options:
--advertise-addr value Advertised address (format: <ip|hostname|interface>[:port]) --advertise-addr value Advertised address (format: <ip|interface>[:port])
--help Print usage --help Print usage
--listen-addr value Listen address --listen-addr value Listen address (format: <ip|interface>[:port)
--token string Token for entry into the swarm --token string Token for entry into the swarm
``` ```
@ -64,7 +64,7 @@ If the node is a manager, it will listen for inbound Swarm manager traffic on th
address. The default is to listen on 0.0.0.0:2377. It is also possible to specify a address. The default is to listen on 0.0.0.0:2377. It is also possible to specify a
network interface to listen on that interface's address; for example `--listen-addr eth0:2377`. network interface to listen on that interface's address; for example `--listen-addr eth0:2377`.
Specifying a port is optional. If the value is a bare IP address, hostname, or interface Specifying a port is optional. If the value is a bare IP address, or interface
name, the default port 2377 will be used. name, the default port 2377 will be used.
This flag is generally not necessary when joining an existing swarm. This flag is generally not necessary when joining an existing swarm.
@ -81,7 +81,7 @@ communication and overlay networking.
It is also possible to specify a network interface to advertise that interface's address; It is also possible to specify a network interface to advertise that interface's address;
for example `--advertise-addr eth0:2377`. for example `--advertise-addr eth0:2377`.
Specifying a port is optional. If the value is a bare IP address, hostname, or interface Specifying a port is optional. If the value is a bare IP address, or interface
name, the default port 2377 will be used. name, the default port 2377 will be used.
This flag is generally not necessary when joining an existing swarm. This flag is generally not necessary when joining an existing swarm.

View File

@ -55,7 +55,7 @@ dockerd - Enable daemon mode
[**-s**|**--storage-driver**[=*STORAGE-DRIVER*]] [**-s**|**--storage-driver**[=*STORAGE-DRIVER*]]
[**--selinux-enabled**] [**--selinux-enabled**]
[**--storage-opt**[=*[]*]] [**--storage-opt**[=*[]*]]
[**--swarm-default-advertise-addr**[=*IP|HOSTNAME|INTERFACE*]] [**--swarm-default-advertise-addr**[=*IP|INTERFACE*]]
[**--tls**] [**--tls**]
[**--tlscacert**[=*~/.docker/ca.pem*]] [**--tlscacert**[=*~/.docker/ca.pem*]]
[**--tlscert**[=*~/.docker/cert.pem*]] [**--tlscert**[=*~/.docker/cert.pem*]]
@ -240,7 +240,7 @@ output otherwise.
**--storage-opt**=[] **--storage-opt**=[]
Set storage driver options. See STORAGE DRIVER OPTIONS. Set storage driver options. See STORAGE DRIVER OPTIONS.
**--swarm-default-advertise-addr**=*IP|HOSTNAME|INTERFACE* **--swarm-default-advertise-addr**=*IP|INTERFACE*
Set default address or interface for swarm to advertise as its externally-reachable address to other cluster Set default address or interface for swarm to advertise as its externally-reachable address to other cluster
members. This can be a hostname, an IP address, or an interface such as `eth0`. A port cannot be specified with members. This can be a hostname, an IP address, or an interface such as `eth0`. A port cannot be specified with
this option. this option.