moby/daemon/config
Rob Murray 6c68be24a2 Windows DNS resolver forwarding
Make the internal DNS resolver for Windows containers forward requests
to upsteam DNS servers when it cannot respond itself, rather than
returning SERVFAIL.

Windows containers are normally configured with the internal resolver
first for service discovery (container name lookup), then external
resolvers from '--dns' or the host's networking configuration.

When a tool like ping gets a SERVFAIL from the internal resolver, it
tries the other nameservers. But, nslookup does not, and with this
change it does not need to.

The internal resolver learns external server addresses from the
container's HNSEndpoint configuration, so it will use the same DNS
servers as processes in the container.

The internal resolver for Windows containers listens on the network's
gateway address, and each container may have a different set of external
DNS servers. So, the resolver uses the source address of the DNS request
to select external resolvers.

On Windows, daemon.json feature option 'windows-no-dns-proxy' can be used
to prevent the internal resolver from forwarding requests (restoring the
old behaviour).

Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-04-16 18:57:28 +01:00
..
builder.go builder-next: adopt new wrapped types 2023-09-21 14:18:48 -06:00
builder_test.go daemon/config: use strings.Cut(), fix panic in BuilderGCFilter 2022-11-16 15:15:05 +01:00
config.go api: add MinSupportedAPIVersion const 2024-02-06 18:44:44 +01:00
config_linux.go Windows DNS resolver forwarding 2024-04-16 18:57:28 +01:00
config_linux_test.go daemon: consolidate runtimes config validation 2023-06-01 14:45:25 -04:00
config_test.go vendor: containerd v1.7.12, and switch to dario.cat/mergo v1.0.0 2024-01-12 18:09:24 +01:00
config_windows.go api: remove API < v1.24 2024-02-06 18:44:44 +01:00
config_windows_test.go daemon/config: clean up tests to use common helper 2023-01-10 13:54:17 -07:00
opts.go Bump swarmkit to v2 2022-04-21 17:33:07 -04:00