Created
August 23, 2017 17:05
-
-
Save vfarcic/0dc78e5e1333ab2225c3988a4b3e7bde to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in 1 2 3; do | |
docker-machine create -d virtualbox swarm-$i | |
done | |
eval $(docker-machine env swarm-1) | |
docker swarm init --advertise-addr $(docker-machine ip swarm-1) | |
TOKEN=$(docker swarm join-token -q manager) | |
for i in 2 3; do | |
eval $(docker-machine env swarm-$i) | |
docker swarm join --advertise-addr $(docker-machine ip swarm-$i) \ | |
--token $TOKEN $(docker-machine ip swarm-1):2377 | |
done | |
docker node ls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment