6c68be24a2
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>
35 lines
865 B
Go
35 lines
865 B
Go
package libnetwork
|
|
|
|
import "github.com/docker/docker/libnetwork/osl"
|
|
|
|
// Windows-specific container configuration flags.
|
|
type containerConfigOS struct {
|
|
dnsNoProxy bool
|
|
}
|
|
|
|
func releaseOSSboxResources(*osl.Namespace, *Endpoint) {}
|
|
|
|
func (sb *Sandbox) updateGateway(*Endpoint) error {
|
|
// not implemented on Windows (Sandbox.osSbox is always nil)
|
|
return nil
|
|
}
|
|
|
|
func (sb *Sandbox) ExecFunc(func()) error {
|
|
// not implemented on Windows (Sandbox.osSbox is always nil)
|
|
return nil
|
|
}
|
|
|
|
func (sb *Sandbox) releaseOSSbox() error {
|
|
// not implemented on Windows (Sandbox.osSbox is always nil)
|
|
return nil
|
|
}
|
|
|
|
func (sb *Sandbox) restoreOslSandbox() error {
|
|
// not implemented on Windows (Sandbox.osSbox is always nil)
|
|
return nil
|
|
}
|
|
|
|
func (sb *Sandbox) populateNetworkResources(*Endpoint) error {
|
|
// not implemented on Windows (Sandbox.osSbox is always nil)
|
|
return nil
|
|
}
|