Forrest logo
back to the docker tool

docker:tldr:e6e79

docker: Join a new node to the cluster.
$ docker swarm join --token ${token} ${manager_node_url:2377}
try on your machine

This command is used to join a Docker Swarm worker node to an existing swarm cluster.

Here is a breakdown of the command:

  • docker swarm join: This is the main command to join a Docker Swarm.
  • --token ${token}: This specifies the join token required to authenticate and join the worker node to the swarm. The ${token} placeholder should be replaced with an actual token.
  • ${manager_node_url:2377}: This specifies the URL and port of the swarm manager node. The ${manager_node_url} placeholder should be replaced with the actual URL of the manager node. The port 2377 is the default port for swarm management communication, but it can be changed if needed.

To use this command, replace ${token} with a valid join token obtained from the swarm manager and ${manager_node_url} with the address of the swarm manager node. Once executed, the worker node will join the swarm and start accepting tasks from the manager.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the docker tool