-
Notifications
You must be signed in to change notification settings - Fork 880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker DNS server returns NXDOMAIN for SRV records #2574
Comments
This should be supported by the embedded DNS server since However, when running on the default ("bridge") network, Docker's embedded DNS server is not used, so not sure what would be causing this. Trying on a non-rootless install of Docker 19.03.12 on ubuntu 20.04 (note that Ubuntu 19.10 is a non-LTS release, and that is EOL), this works for me; docker run --rm alpine sh -c 'apk add -q --no-cache bind-tools && dig -t srv _imaps._tcp.gmail.com'
; <<>> DiG 9.14.12 <<>> -t srv _imaps._tcp.gmail.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56678
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;_imaps._tcp.gmail.com. IN SRV
;; ANSWER SECTION:
_imaps._tcp.gmail.com. 86062 IN SRV 5 0 993 imap.gmail.com.
;; Query time: 0 msec
;; SERVER: 67.207.67.2#53(67.207.67.2)
;; WHEN: Thu Aug 27 12:30:48 UTC 2020
;; MSG SIZE rcvd: 84 And with a custom network; docker network create mynet
docker run --rm --network=mynet alpine sh -c 'apk add -q --no-cache bind-tools && dig -t srv _imaps._tcp.gmail.com'
; <<>> DiG 9.14.12 <<>> -t srv _imaps._tcp.gmail.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34420
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;_imaps._tcp.gmail.com. IN SRV
;; ANSWER SECTION:
_imaps._tcp.gmail.com. 86025 IN SRV 5 0 993 imap.gmail.com.
;; Query time: 1 msec
;; SERVER: 127.0.0.11#53(127.0.0.11)
;; WHEN: Thu Aug 27 12:31:25 UTC 2020
;; MSG SIZE rcvd: 84 Are you seeing the same problem when running docker in non-rootless mode? |
Right, I do not see the problem in non-rootless mode, but I don't have root access where I need to be able to run my containers, so that's not going to help me much. |
@AkihiroSuda ptal |
This is a VPNKit issue. |
opened an issue in VPNKit repo: moby/vpnkit#509 |
Thanks! Let me close this ticket in favour of moby/vpnkit#509 |
I can confirm that using slirp4netns instead of vpnkit gets things working for me, thanks! |
Docker's internal DNS server doesn't appear to function properly when attempting to resolve SRV records. A lookup like
dig -t srv _imaps._tcp.gmail.com
works fine on the host system, but returns NXDOMAIN inside a container.Steps to reproduce:
SRV lookup inside a container:
System info:
The text was updated successfully, but these errors were encountered: