Last active
July 31, 2019 20:17
-
-
Save davidalger/ff7be7e13f23ca59c96ada6004e3c25b to your computer and use it in GitHub Desktop.
Demonstrate Docker for Mac issue with priviledged UDP ports for DNS: https://github.com/docker/for-mac/issues/3775
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
#!/bin/bash | |
function :: { | |
echo "==> $@" | |
"$@" | |
} | |
test_dir="$(mktemp -d -t dnstest)" | |
:: cd "${test_dir}" | |
cat > docker-compose.yml <<-EOT | |
version: "3.5" | |
services: | |
dnsmasq: | |
image: jpillora/dnsmasq | |
ports: | |
- "127.0.0.1:53:53/udp" | |
- "127.0.0.1:1024:53/udp" | |
- "127.0.0.1:1025:53/udp" | |
- "127.0.0.1:5000:53/udp" | |
- "127.0.0.1:53:53/tcp" | |
- "127.0.0.1:1024:53/tcp" | |
- "127.0.0.1:1025:53/tcp" | |
- "127.0.0.1:5000:53/tcp" | |
EOT | |
:: docker-compose up -d | |
:: dig +noall +answer apple.com @127.0.0.1 -p 53 | |
:: dig +noall +answer apple.com @127.0.0.1 -p 1024 | |
:: dig +noall +answer apple.com @127.0.0.1 -p 1025 | |
:: dig +noall +answer apple.com @127.0.0.1 -p 5000 | |
:: dig +tcp +noall +answer apple.com @127.0.0.1 -p 53 | |
:: dig +tcp +noall +answer apple.com @127.0.0.1 -p 1024 | |
:: dig +tcp +noall +answer apple.com @127.0.0.1 -p 1025 | |
:: dig +tcp +noall +answer apple.com @127.0.0.1 -p 5000 | |
:: docker-compose down -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment