Skip to content

Instantly share code, notes, and snippets.

@gesellix
Last active August 5, 2017 20:31
Show Gist options
  • Save gesellix/ffaddebcf3df2f265807d29124f7a609 to your computer and use it in GitHub Desktop.
Save gesellix/ffaddebcf3df2f265807d29124f7a609 to your computer and use it in GitHub Desktop.
showcase docker dns for service tasks

Create an attachable network for further demo purposes

docker network create --attachable --driver overlay example

Create a service nginx with 2 tasks

docker service create --network example --name nginx --replicas 2 nginx:alpine

Resolve all task ips of the nginx service

docker run --rm -it --network example alpine:edge sh -c "apk add -U drill; drill tasks.nginx"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment