mirror of https://github.com/docker/cli.git
Output `docker swarm join` on a single line
This avoids issues when copy/pasting between different shells on different OSes, which may not all support `\` as a continuation character. Fixes #32725 Signed-off-by: Dave Henderson <dhenderson@gmail.com>
This commit is contained in:
parent
a1b7969bce
commit
2b31a4bf8d
|
@ -108,10 +108,10 @@ func printJoinCommand(ctx context.Context, dockerCli command.Cli, nodeID string,
|
||||||
|
|
||||||
if node.ManagerStatus != nil {
|
if node.ManagerStatus != nil {
|
||||||
if worker {
|
if worker {
|
||||||
fmt.Fprintf(dockerCli.Out(), "To add a worker to this swarm, run the following command:\n\n docker swarm join \\\n --token %s \\\n %s\n\n", sw.JoinTokens.Worker, node.ManagerStatus.Addr)
|
fmt.Fprintf(dockerCli.Out(), "To add a worker to this swarm, run the following command:\n\n docker swarm join --token %s %s\n\n", sw.JoinTokens.Worker, node.ManagerStatus.Addr)
|
||||||
}
|
}
|
||||||
if manager {
|
if manager {
|
||||||
fmt.Fprintf(dockerCli.Out(), "To add a manager to this swarm, run the following command:\n\n docker swarm join \\\n --token %s \\\n %s\n\n", sw.JoinTokens.Manager, node.ManagerStatus.Addr)
|
fmt.Fprintf(dockerCli.Out(), "To add a manager to this swarm, run the following command:\n\n docker swarm join --token %s %s\n\n", sw.JoinTokens.Manager, node.ManagerStatus.Addr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,4 @@ Successfully rotated manager join token.
|
||||||
|
|
||||||
To add a manager to this swarm, run the following command:
|
To add a manager to this swarm, run the following command:
|
||||||
|
|
||||||
docker swarm join \
|
docker swarm join --token manager-join-token 127.0.0.1
|
||||||
--token manager-join-token \
|
|
||||||
127.0.0.1
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
To add a manager to this swarm, run the following command:
|
To add a manager to this swarm, run the following command:
|
||||||
|
|
||||||
docker swarm join \
|
docker swarm join --token manager-join-token 127.0.0.1
|
||||||
--token manager-join-token \
|
|
||||||
127.0.0.1
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
To add a worker to this swarm, run the following command:
|
To add a worker to this swarm, run the following command:
|
||||||
|
|
||||||
docker swarm join \
|
docker swarm join --token worker-join-token 127.0.0.1
|
||||||
--token worker-join-token \
|
|
||||||
127.0.0.1
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue