Created
March 28, 2016 18:33
-
-
Save miqui/0e77eedfa9f44e4894db to your computer and use it in GitHub Desktop.
Docker swarm by docker-machine
This file contains 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
#!/bin/bash | |
## Docker swarm with docker-machine | |
sid=$(docker run swarm create) | |
docker-machine create -d virtualbox --swarm --swarm-master --swarm-discovery token://$sid swarm-master | |
docker-machine create -d virtualbox --swarm --swarm-discovery token://$sid swarm-node-01 | |
docker-machine create -d virtualbox --swarm --swarm-discovery token://$sid swarm-node-02 | |
docker-machine create -d virtualbox --swarm --swarm-discovery token://$sid swarm-node-03 | |
eval "$(docker-machine env --swarm swarm-master)" | |
#docker info | |
#docker run swarm list token://$sid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment