summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-12-06 13:56:57 -0600
committerbaude <bbaude@redhat.com>2018-12-06 13:56:57 -0600
commit39a036e24d026b62e49ce7ba00de8bafd38cd953 (patch)
treee626187c00ff9f5b16ca660e213b7c34d0739f22 /libpod/container_internal.go
parent5c6e02b55be974f08e3b1e895046a3cf167fd3f7 (diff)
downloadpodman-39a036e24d026b62e49ce7ba00de8bafd38cd953.tar.gz
podman-39a036e24d026b62e49ce7ba00de8bafd38cd953.tar.bz2
podman-39a036e24d026b62e49ce7ba00de8bafd38cd953.zip
bind mount /etc/resolv.conf|hosts in pods
containers inside pods need to make sure they get /etc/resolv.conf and /etc/hosts bind mounted when network is expected Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 934ad7a22..0148e3e7c 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -601,7 +601,11 @@ func (c *Container) checkDependenciesRunningLocked(depCtrs map[string]*Container
}
func (c *Container) completeNetworkSetup() error {
- if !c.config.PostConfigureNetNS || c.NetworkDisabled() {
+ netDisabled, err := c.NetworkDisabled()
+ if err != nil {
+ return err
+ }
+ if !c.config.PostConfigureNetNS || netDisabled {
return nil
}
if err := c.syncContainer(); err != nil {