mirror of
https://github.com/containers/podman.git
synced 2025-05-20 08:36:23 +08:00
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:
@ -505,7 +505,11 @@ func (c *CreateConfig) GetContainerCreateOptions(runtime *libpod.Runtime, pod *l
|
||||
options = append(options, libpod.WithDNSSearch(c.DNSSearch))
|
||||
}
|
||||
if len(c.DNSServers) > 0 {
|
||||
options = append(options, libpod.WithDNS(c.DNSServers))
|
||||
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))
|
||||
|
Reference in New Issue
Block a user