Skip to content

Instantly share code, notes, and snippets.

@pascalandy
Created October 28, 2016 17:14
Show Gist options
  • Save pascalandy/96a2b5278bc3a7940163d675b19a2dbc to your computer and use it in GitHub Desktop.
Save pascalandy/96a2b5278bc3a7940163d675b19a2dbc to your computer and use it in GitHub Desktop.
SwarmModeNetworking.md

Here's a quick tester for Swarm Mode that will work everywhere..

$ docker service create --name nginx1 -p 8080:80 --replicas=5 --mount source=/etc/hostname,target=/usr/share/nginx/html/index.html,type=bind nginx

You effectively bind mount the hostname as the index.html page meaning you can see the round-robin / mesh networking in action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment