swarm_join
Join a Docker Engine to an existing swarm as a worker or manager by providing a join token and manager addresses.
Instructions
Join this Engine to an existing swarm as a worker or manager.
Fails if the Engine is already part of a swarm. Whether this node joins as a worker or
a manager is determined entirely by which token is passed — join_token must be one of
the two tokens from swarm_join_tokens, called against any existing manager. advertise_addr
only needs setting when this host has multiple network interfaces or is behind NAT
(otherwise it is auto-detected from the interface used to reach remote_addrs); it must
be reachable by every other node in the swarm.
args:
remote_addrs - Address(es) of existing swarm managers to connect to
join_token - The worker or manager join token (from swarm_join_tokens) — determines
the role this node joins as
listen_addr - Listen address for inter-manager communication
advertise_addr - Externally reachable address advertised to other nodes
data_path_addr - Address to use for data path traffic
returns: bool - True after the engine joins the swarm
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| join_token | Yes | ||
| listen_addr | No | 0.0.0.0:2377 | |
| remote_addrs | Yes | ||
| advertise_addr | No | ||
| data_path_addr | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |