Skip to content

Instantly share code, notes, and snippets.

@anokun7
Created March 9, 2016 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anokun7/13841779b011f59e690b to your computer and use it in GitHub Desktop.
Save anokun7/13841779b011f59e690b to your computer and use it in GitHub Desktop.
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)"
docker info
docker network create -d overlay bluebird
docker run -d --name web --net bluebird nginx
docker run -itd --name os --net bluebird alpine /bin/sh
docker ps
docker attach os
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment