aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-03-22 14:52:56 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-03-27 10:12:18 -0400
commit16a7c7ff82e53bb29d03d816ffa53ae4ae29e86f (patch)
tree2c721e186397037ca08d16f7bfb544faee53609a /pkg
parent72f03f0c2587be4ff3ff9c83d28964cc7c1a135c (diff)
downloadpodman-16a7c7ff82e53bb29d03d816ffa53ae4ae29e86f.tar.gz
podman-16a7c7ff82e53bb29d03d816ffa53ae4ae29e86f.tar.bz2
podman-16a7c7ff82e53bb29d03d816ffa53ae4ae29e86f.zip
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>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/spec/createconfig.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/spec/createconfig.go b/pkg/spec/createconfig.go
index 118fbad72..fba69d1ba 100644
--- a/pkg/spec/createconfig.go
+++ b/pkg/spec/createconfig.go
@@ -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))