Add for --dns=none to disable creation of resolv.conf
Support in libpod was added in the previous commit. Wire it into
the frontend here.
@@ -505,8 +505,12 @@ func (c *CreateConfig) GetContainerCreateOptions(runtime *libpod.Runtime, pod *l
options = append(options, libpod.WithDNSSearch(c.DNSSearch))
}
if len(c.DNSServers) > 0 {
+ if len(c.DNSServers) == 1 && c.DNSServers[0] == "none" {
+ options = append(options, libpod.WithNoCreateResolvConf())
+ } else {
options = append(options, libpod.WithDNS(c.DNSServers))
}
+ }
if len(c.DNSOpt) > 0 {
options = append(options, libpod.WithDNSOption(c.DNSOpt))
}
