Closed soullivaneuh closed 8 years ago
This could help IMO: http://tip.golang.org/pkg/net/#LookupIP
Any news?
Try:
curl http://127.0.0.1:8080/google-public-dns-a.google.com:53/google.com/a
You will see it works as intended.
I'm sorry but this should not be closed.
Yes indeed, this works for external public servers.
But I can ensure you this is not working with dnsmasq
.
dnsmasq
is a host defined on /etc/hosts
linux file of the docker image. This host is working, but not with your app.
Maybe this have issue with "non standard" hosts (e.g. no tld at the end)?
More information:
/go # cat /etc/hosts
172.17.0.8 dnsmasq ccbbc15c11cd
172.17.0.8 dnsmasq_1 ccbbc15c11cd
Two checks:
http://127.0.0.1:8080/172.17.0.8:53/google.com/a
=> WORKShttp://127.0.0.1:8080/dnsmasq:53/google.com/a
=> NOT WORKINGSo there is an issue, maybe not with external NS but with locally define domain names.
I have a rrda local server and a dnsmasq local server, composed with Docker.
If I try the following URL:
http://rrda/dnsmasq:53/google.fr/A
I get a
DNS server could not be reached
error.But, from the rrda machine, if I try the following command:
It works.
So I suppose your API does not support dns nameserver.
Could be possible to have this one? I can't pass IPs with Docker.