summaryrefslogtreecommitdiff
path: root/libpod/container.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-03-22 14:39:09 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-03-27 10:12:18 -0400
commit72f03f0c2587be4ff3ff9c83d28964cc7c1a135c (patch)
tree25e1824dff64b5069eb4b1fd4e16ebad6185b8b5 /libpod/container.go
parentb20594ea51ba1fb21cb727a8b224415335e04ac7 (diff)
downloadpodman-72f03f0c2587be4ff3ff9c83d28964cc7c1a135c.tar.gz
podman-72f03f0c2587be4ff3ff9c83d28964cc7c1a135c.tar.bz2
podman-72f03f0c2587be4ff3ff9c83d28964cc7c1a135c.zip
Add support to disable creation of network config files
Specifically, we want to be able to specify whether resolv.conf and /etc/hosts will be create and bind-mounted into the container. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/container.go')
-rw-r--r--libpod/container.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/libpod/container.go b/libpod/container.go
index ec4e31026..866cf5c58 100644
--- a/libpod/container.go
+++ b/libpod/container.go
@@ -293,6 +293,10 @@ type ContainerConfig struct {
// namespace
// These are not used unless CreateNetNS is true
PortMappings []ocicni.PortMapping `json:"portMappings,omitempty"`
+ // NoCreateResolvConf indicates that resolv.conf should not be
+ // bind-mounted inside the container.
+ // Conflicts with DNSServer, DNSSearch, DNSOption.
+ NoCreateResolvConf bool
// DNS servers to use in container resolv.conf
// Will override servers in host resolv if set
DNSServer []net.IP `json:"dnsServer,omitempty"`
@@ -302,6 +306,10 @@ type ContainerConfig struct {
// DNS options to be set in container resolv.conf
// With override options in host resolv if set
DNSOption []string `json:"dnsOption,omitempty"`
+ // NoCreateHosts indicates that /etc/hosts should not be
+ // bind-mounted inside the container.
+ // Conflicts with HostAdd.
+ NoCreateHosts bool
// Hosts to add in container
// Will be appended to host's host file
HostAdd []string `json:"hostsAdd,omitempty"`