Skip to content

Instantly share code, notes, and snippets.

docker-machine create -d virtualbox kv
docker $(docker-machine config kv) login
docker $(docker-machine config kv) run -d -p 8500:8500 -h consul progrium/consul -server -bootstrap
docker-machine create -d virtualbox --swarm --swarm-master --swarm-discovery="consul://$(docker-machine ip kv):8500" --engine-opt="cluster-store=consul://$(docker-machine
 ip kv):8500" --engine-opt="cluster-advertise=eth1:2376" swarm-manager
docker-machine create -d virtualbox --swarm --swarm-discovery="consul://$(docker-machine ip kv):8500" --engine-opt="cluster-store=consul://$(docker-machine ip kv):8500" -
-engine-opt="cluster-advertise=eth1:2376" node1
docker-machine create -d virtualbox --swarm --swarm-discovery="consul://$(docker-machine ip kv):8500" --engine-opt="cluster-store=consul://$(docker-machine ip kv):8500" --engine-opt="cluster-advertise=eth1:2376" node2
eval "$(docker-machine env --swarm swarm-manager)"