Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create a Docker Swarm with docker-machine and enable dockerd Unix Sockets
export SWARM_TOKEN=$(docker run swarm create)
docker-machine create \
-d virtualbox \
--engine-env 'DOCKER_OPTS="-H unix:///var/run/docker.sock"' \
--swarm \
--swarm-master \
--swarm-discovery token://$SWARM_TOKEN \
swarm-master
for NODE in {1..3};
do
docker-machine create \
--engine-env 'DOCKER_OPTS="-H unix:///var/run/docker.sock"' \
-d virtualbox \
--swarm \
--swarm-discovery token://$SWARM_TOKEN \
"swarm-agent-$NODE"
done
@megastef

This comment has been minimized.

Copy link
Owner Author

@megastef megastef commented Jan 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.