diff --git a/docs/reference/commandline/swarm_init.md b/docs/reference/commandline/swarm_init.md index c4a7a99e84..e52af0e5cd 100644 --- a/docs/reference/commandline/swarm_init.md +++ b/docs/reference/commandline/swarm_init.md @@ -35,14 +35,12 @@ $ docker swarm init --advertise-addr 192.168.99.121 Swarm initialized: current node (bvz81updecsj6wjz393c09vti) is now a manager. To add a worker to this swarm, run the following command: + docker swarm join \ --token SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx \ 172.17.0.2:2377 -To add a manager to this swarm, run the following command: - docker swarm join \ - --token SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2 \ - 172.17.0.2:2377 +To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions. ``` `docker swarm init` generates two random tokens, a worker token and a manager token. When you join diff --git a/docs/reference/commandline/swarm_join_token.md b/docs/reference/commandline/swarm_join_token.md index 996ca01fee..4b4d652bf3 100644 --- a/docs/reference/commandline/swarm_join_token.md +++ b/docs/reference/commandline/swarm_join_token.md @@ -36,12 +36,14 @@ the swarm: ```bash $ docker swarm join-token worker To add a worker to this swarm, run the following command: + docker swarm join \ --token SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx \ 172.17.0.2:2377 $ docker swarm join-token manager To add a manager to this swarm, run the following command: + docker swarm join \ --token SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2 \ 172.17.0.2:2377 @@ -51,7 +53,10 @@ Use the `--rotate` flag to generate a new join token for the specified role: ```bash $ docker swarm join-token --rotate worker +Succesfully rotated worker join token. + To add a worker to this swarm, run the following command: + docker swarm join \ --token SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-b30ljddcqhef9b9v4rs7mel7t \ 172.17.0.2:2377 @@ -63,6 +68,7 @@ The `-q` (or `--quiet`) flag only prints the token: ```bash $ docker swarm join-token -q worker + SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-b30ljddcqhef9b9v4rs7mel7t ```