
In #24159, the title field of `docker node ls` has been
changed from NAME to HOSTNAME. However, in the docs the
NAMEs are still used for the output of `docker node ls`.
This fix updates docs so that NAME field is changed to
HOSTNAME for all `docker node ls`.
This fix is related to #24159 and #24090.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 668b8a998f
)
Signed-off-by: Tibor Vass <tibor@docker.com>
2.8 KiB
Warning: this command is part of the Swarm management feature introduced in Docker 1.12, and might be subject to non backward-compatible changes.
swarm init
Usage: docker swarm init [OPTIONS]
Initialize a Swarm.
Options:
--auto-accept value Acceptance policy (default [worker,manager])
--external-ca value Specifications of one or more certificate signing endpoints
--force-new-cluster Force create a new cluster from current state.
--help Print usage
--listen-addr value Listen address (default 0.0.0.0:2377)
--secret string Set secret value needed to accept nodes into cluster
Initialize a Swarm cluster. The docker engine targeted by this command becomes a manager in the newly created one node Swarm cluster.
$ docker swarm init --listen-addr 192.168.99.121:2377
Swarm initialized: current node (1ujecd0j9n3ro9i6628smdmth) is now a manager.
$ docker node ls
ID HOSTNAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS LEADER
1ujecd0j9n3ro9i6628smdmth * manager1 Accepted Ready Active Reachable Yes
--auto-accept value
This flag controls node acceptance into the cluster. By default, worker
nodes are
automatically accepted by the cluster. This can be changed by specifying what kinds of nodes
can be auto-accepted into the cluster. If auto-accept is not turned on, then
node accept can be used to explicitly accept a node into the cluster.
For example, the following initializes a cluster with auto-acceptance of workers, but not managers
$ docker swarm init --listen-addr 192.168.99.121:2377 --auto-accept worker
Swarm initialized: current node (1m8cdsylxbf3lk8qriqt07hx1) is now a manager.
--external-ca value
This flag sets up the swarm to use an external CA to issue node certificates. The value takes
the form protocol=X,url=Y
. The value for protocol
specifies what protocol should be used
to send signing requests to the external CA. Currently, the only supported value is cfssl
.
The URL specifies the endpoint where signing requests should be submitted.
--force-new-cluster
This flag forces an existing node that was part of a quorum that was lost to restart as a single node Manager without losing its data
--listen-addr value
The node listens for inbound Swarm manager traffic on this IP:PORT
--secret string
Secret value needed to accept nodes into the Swarm