Description
Is this a docs issue?
- My issue is about the documentation content or website
Type of issue
I can't find what I'm looking for
Description
Summary
Add a note to the documentation indicating that Docker falls back to Google DNS if no non-localhost DNS is defined.
Details
In one of my projects, I started a Docker container on a device without internet access and with no configured DNS other than localhost.
Inside the container, some DNS requests timed out after a long delay. I expected the DNS requests to fail immediately.
Upon checking the dockerd log, I found the following line during startup:
No non-localhost DNS nameservers are left in resolv.conf. Using default external servers: [nameserver 8.8.8.8 nameserver 8.8.4.4]
I reviewed the DNS section of the networking chapter, but found no mention of this behavior. I only discovered it referenced in another issue: moby/moby#23910
Am I missing something?
Edit: Tested with Docker version 24.0.5, build ced0996
Location
https://docs.docker.com/engine/network/#dns-services
Suggestion
Maybe add a simple sentence to the chapter:
In case no non-localhost DNS is defined in the `/etc/resolve.conf`, a fallback to `8.8.8.8` and `8.8.4.4` will be added.
Exact formulation and placement is of course open for discussion.