Merge pull request #47490 from akerouanton/25.0-47370_windows_nat_network_dns
[25.0 backport] Set up DNS names for Windows default network
This commit is contained in:
commit
41fde13f64
1 changed files with 4 additions and 1 deletions
|
@ -649,7 +649,10 @@ func cleanOperationalData(es *network.EndpointSettings) {
|
|||
}
|
||||
|
||||
func (daemon *Daemon) updateNetworkConfig(container *container.Container, n *libnetwork.Network, endpointConfig *networktypes.EndpointSettings, updateSettings bool) error {
|
||||
if containertypes.NetworkMode(n.Name()).IsUserDefined() {
|
||||
// Set up DNS names for a user defined network, and for the default 'nat'
|
||||
// network on Windows (IsBridge() returns true for nat).
|
||||
if containertypes.NetworkMode(n.Name()).IsUserDefined() ||
|
||||
(serviceDiscoveryOnDefaultNetwork() && containertypes.NetworkMode(n.Name()).IsBridge()) {
|
||||
endpointConfig.DNSNames = buildEndpointDNSNames(container, endpointConfig.Aliases)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue