Skip to content

Instantly share code, notes, and snippets.

@darron
Last active August 29, 2015 14:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darron/b724b4c42dbfe0fc8716 to your computer and use it in GitHub Desktop.
Save darron/b724b4c42dbfe0fc8716 to your computer and use it in GitHub Desktop.
Setup Docker Swarm
docker run --rm swarm create
4e512cc6363c4d464817c002cd8a8bdb # your number will be different
export SWARM_TOKEN="4e512cc6363c4d464817c002cd8a8bdb" # your number will be different
docker run -d swarm join --addr=$PRIVATE_IPV4:4243 token://$SWARM_TOKEN # kill this after a minute.
docker run --rm swarm list token://$SWARM_TOKEN
docker run --restart=always -d -p 2375:2375 -t swarm manage token://$SWARM_TOKEN # only run this on the first node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment