Created
September 1, 2016 11:40
-
-
Save daviddyball/85cf3428f93ea706003b6a874b60f9cb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker network create --driver overlay test-net | |
| docker service create --name test-server \ | |
| --publish 80:80 \ | |
| --replicas 1 \ | |
| --network test-net \ | |
| debian:latest \ | |
| /bin/bash -lc "apt-get update && apt-get install -y netcat && echo test > /tmp/page.html; while true; do nc -l 80 < /tmp/page.html; done" | |
| docker service create --name test-consumer \ | |
| --replicas 2 \ | |
| --network test-net \ | |
| debian:latest \ | |
| /bin/bash -lc "sleep 3600" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I have 5 nodes (3 exclusive managers, 2 workers), I end up with
test-serverrunning onworker1and a copy oftest-consumeron bothworker1andworker2howevertest-consumeronworker2can't resolvetest-servervia DNS or access it via the service VIP.