Forrest logo
back to the docker tool

docker:tldr:947dc

docker: Display the token to join a manager or a worker.
$ docker swarm join-token ${select}
try on your machine

The command "docker swarm join-token select" is used to display the join token for a worker or manager node to join a Docker swarm cluster. Here, "${select}" is a placeholder that should be replaced with either "worker" or "manager" based on the type of node you want to add to the swarm.

When you execute the command "docker swarm join-token worker", it will output a command that needs to be executed on the worker node you want to add. This command includes the token and address for the worker to join the swarm.

Similarly, when you execute "docker swarm join-token manager", it will generate a command for adding a manager node, including the token and address specific to managers.

The join token is a randomly generated string that provides authentication and authorization for the node to join the swarm cluster.

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