docker swarm init

Initialize a swarm

Options

NameDescription
--advertise-addr <string>Advertised address (format: <ip|interface>[:port])
--autolockEnable manager autolocking (requiring an unlock key to start a stopped manager)
--availability <string>Availability of the node ("active"|"pause"|"drain") (default "active")
--cert-expiry <duration>Validity period for node certificates (ns|us|ms|s|m|h) (default 2160h0m0s)
--data-path-addr <string>Address or interface to use for data path traffic (format: <ip|interface>)
--data-path-port <uint32>Port number to use for data path traffic (1024 - 49151). If no value is set or is set to 0, the default port (4789) is used
--default-addr-pool <ipNetSlice>Default address pool in CIDR format (default [])
--default-addr-pool-mask-length <uint32>Default address pool subnet mask length (default 24)
--dispatcher-heartbeat <duration>Dispatcher heartbeat period (ns|us|ms|s|m|h) (default 5s)
--external-ca <external-ca>Specifications of one or more certificate signing endpoints
--force-new-clusterForce create a new cluster from current state
--listen-addr <node-addr>Listen address (format: <ip|interface>[:port]) (default 0.0.0.0:2377)
--max-snapshots <uint>Number of additional Raft snapshots to retain
--snapshot-interval <uint>Number of log entries between Raft snapshots (default 10000)
--task-history-limit <int>Task history retention limit (default 5)