summaryrefslogtreecommitdiff
path: root/pkg/spec/createconfig.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-03-26 13:55:19 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-03-27 10:12:18 -0400
commit0cd92eae65b31cdbaa19e3cccb0e3234196a6d17 (patch)
tree97ad5dec432154ba5bc88e758d5110494d45d35f /pkg/spec/createconfig.go
parent86f03e0e526bbf39ea8a6cb18e3067a7e37bfd89 (diff)
downloadpodman-0cd92eae65b31cdbaa19e3cccb0e3234196a6d17.tar.gz
podman-0cd92eae65b31cdbaa19e3cccb0e3234196a6d17.tar.bz2
podman-0cd92eae65b31cdbaa19e3cccb0e3234196a6d17.zip
Resolve review comments
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'pkg/spec/createconfig.go')
-rw-r--r--pkg/spec/createconfig.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/spec/createconfig.go b/pkg/spec/createconfig.go
index 15719beab..79a318771 100644
--- a/pkg/spec/createconfig.go
+++ b/pkg/spec/createconfig.go
@@ -506,8 +506,8 @@ 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())
+ if len(c.DNSServers) == 1 && strings.ToLower(c.DNSServers[0]) == "none" {
+ options = append(options, libpod.WithUseImageResolvConf())
} else {
options = append(options, libpod.WithDNS(c.DNSServers))
}
@@ -516,7 +516,7 @@ func (c *CreateConfig) GetContainerCreateOptions(runtime *libpod.Runtime, pod *l
options = append(options, libpod.WithDNSOption(c.DNSOpt))
}
if c.NoHosts {
- options = append(options, libpod.WithNoCreateHosts())
+ options = append(options, libpod.WithUseImageHosts())
}
if len(c.HostAdd) > 0 && !c.NoHosts {
options = append(options, libpod.WithHosts(c.HostAdd))