mirror of https://github.com/containers/podman.git
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. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
parent
72f03f0c25
commit
16a7c7ff82
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue