|
@@ -112,8 +112,7 @@ func (daemon *Daemon) createSpec(ctx context.Context, daemonCfg *configStore, c
|
|
|
mounts = append(mounts, secretMounts...)
|
|
|
}
|
|
|
|
|
|
- configMounts := c.ConfigMounts()
|
|
|
- if configMounts != nil {
|
|
|
+ if configMounts := c.ConfigMounts(); configMounts != nil {
|
|
|
mounts = append(mounts, configMounts...)
|
|
|
}
|
|
|
|
|
@@ -145,8 +144,6 @@ func (daemon *Daemon) createSpec(ctx context.Context, daemonCfg *configStore, c
|
|
|
return nil, errors.Wrapf(err, "container %s", c.ID)
|
|
|
}
|
|
|
|
|
|
- dnsSearch := daemon.getDNSSearchSettings(&daemonCfg.Config, c)
|
|
|
-
|
|
|
// Get endpoints for the libnetwork allocated networks to the container
|
|
|
var epList []string
|
|
|
AllowUnqualifiedDNSQuery := false
|
|
@@ -197,6 +194,13 @@ func (daemon *Daemon) createSpec(ctx context.Context, daemonCfg *configStore, c
|
|
|
epList = append(epList, gwHNSID)
|
|
|
}
|
|
|
|
|
|
+ var dnsSearch []string
|
|
|
+ if len(c.HostConfig.DNSSearch) > 0 {
|
|
|
+ dnsSearch = c.HostConfig.DNSSearch
|
|
|
+ } else if len(daemonCfg.DNSSearch) > 0 {
|
|
|
+ dnsSearch = daemonCfg.DNSSearch
|
|
|
+ }
|
|
|
+
|
|
|
s.Windows.Network = &specs.WindowsNetwork{
|
|
|
AllowUnqualifiedDNSQuery: AllowUnqualifiedDNSQuery,
|
|
|
DNSSearchList: dnsSearch,
|