Docker Community Forums

Share and learn in the Docker community.

[Bug] DNS entries in stackfiles not passed to /etc/resolv.conf


(Marcinw) #1

Locally docker-compose.yml with an entry like:


results in /etc/resolv.conflooking like this:

search local

On Docker cloud, the same entry in the stackfile results in /etc/resolv.conf looking like this:

# cat /etc/resolv.conf                                                                                                                                                   
search <redacted>                                                                                                           
options ndots:1 ndots:0

If a nameserver at is required for Docker Cloud to work, I’d still expect to be injected at least as a secondary nameserver. We’ve had issues with timeouts on the local resolver and really want the secondary one.

(Iteamnetworkdc) #2

@marcinw Absolutely agree! We are having the same issues. The local resolver for services can not handle high throughput. I posted in a similar thread yesterday with no answers.

@fermayo? Anyone over at Docker Cloud?

(Imjosh2) #3


I did this to solve the problem:

(Marcinw) #4

I’m afraid that editing the /etc/resolv.conf at runtime does not work. I did the same, adding to the list of nameservers, and got it pretty much immediately overwritten by Docker Cloud’s default (DHCP at work, I reckon).

I’m solving this at the application level at the moment - here’s a Go library I wrote to use custom DNS.

(Marcinw) #5

Still though, no response from the Docker Cloud team, in conjunction with yesterday’s DNS outage makes it a priority for me to explore alternatives.

(Imjosh2) #6

I’m not sure what the difference is, but I’m not experiencing my resolv.conf being overwritten even after many days.