mirror of https://github.com/docker/docs.git
Make clear that you must manually interpolate token.
Signed-off-by: Luke Marsden <luke@clusterhq.com>
This commit is contained in:
parent
dbc07ba174
commit
dc393390da
14
README.md
14
README.md
|
@ -30,26 +30,26 @@ This can be achieved by starting Docker with the `-H` flag (e.g. `-H 0.0.0.0:237
|
|||
|
||||
```bash
|
||||
# create a cluster
|
||||
$ SWARM_TOKEN=`swarm create`; echo $SWARM_TOKEN
|
||||
6856663cdefdec325839a4b7e1de38e8
|
||||
$ swarm create
|
||||
6856663cdefdec325839a4b7e1de38e8 # <- this is your unique <cluster_id>
|
||||
|
||||
# on each of your nodes, start the swarm agent
|
||||
# <node_ip> doesn't have to be public (eg. 192.168.0.X),
|
||||
# as long as the other nodes can reach it, it is fine.
|
||||
$ swarm join --discovery token://$SWARM_TOKEN --addr=<node_ip:2375>
|
||||
$ swarm join --discovery token://<cluster_id> --addr=<node_ip:2375>
|
||||
|
||||
# start the manager on any machine or your laptop
|
||||
$ swarm manage --discovery token://$SWARM_TOKEN -H=<swarm_ip:swarm_port>
|
||||
$ swarm manage --discovery token://<cluster_id> -H=<swarm_ip:swarm_port>
|
||||
|
||||
# use the regular docker cli
|
||||
$ docker -H <swarm_ip:swarm_port> info
|
||||
$ docker -H <swarm_ip:swarm_port> run ...
|
||||
$ docker -H <swarm_ip:swarm_port> ps
|
||||
$ docker -H <swarm_ip:swarm_port> run ...
|
||||
$ docker -H <swarm_ip:swarm_port> ps
|
||||
$ docker -H <swarm_ip:swarm_port> logs ...
|
||||
...
|
||||
|
||||
# list nodes in your cluster
|
||||
$ swarm list --discovery token://$SWARM_TOKEN
|
||||
$ swarm list --discovery token://<cluster_id>
|
||||
http://<node_ip:2375>
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue