Skip to content

Instantly share code, notes, and snippets.

@davethegr8
Last active March 31, 2017 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davethegr8/f791ed7fac6f3fdc897b6945b422d36a to your computer and use it in GitHub Desktop.
Save davethegr8/f791ed7fac6f3fdc897b6945b422d36a to your computer and use it in GitHub Desktop.
embedded dns problems
version: "2"
services:
ping:
image: python:3.6-alpine
command: "ping -c 1 google.com"
dns:
image: python:3.6-alpine
command: "cat /etc/resolv.conf"
$ sudo ./test.sh
PING google.com (172.217.3.174): 56 data bytes
64 bytes from 172.217.3.174: seq=0 ttl=50 time=3.913 ms
--- google.com ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 3.913/3.913/3.913 ms
search redacted.com
options ndots:2
nameserver 10.18.0.1
nameserver 10.18.0.2
nameserver 10.50.5.1
Creating pingtest_ping_1
Creating pingtest_dns_1
Attaching to pingtest_ping_1, pingtest_dns_1
dns_1 | search redacted.com
dns_1 | nameserver 127.0.0.11
dns_1 | options ndots:2 ndots:0
pingtest_dns_1 exited with code 0
ping_1 | ping: bad address 'google.com'
pingtest_ping_1 exited with code 1
docker network create updog
docker run --rm --network updog python:3.6-alpine ping -c 1 google.com
docker run --rm --network updog python:3.6-alpine cat /etc/resolv.conf
docker network rm updog
docker-compose up --build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment