-
-
Save davethegr8/f791ed7fac6f3fdc897b6945b422d36a to your computer and use it in GitHub Desktop.
embedded dns problems
This file contains 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
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" |
This file contains 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
$ 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 |
This file contains 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 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