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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
Related blog post: http://blog.sematext.com/2016/01/12/docker-swarm-collecting-metrics-events-logs/