diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-11-28 07:58:55 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-28 07:58:55 -0800 |
commit | ade0b3084436f1b9325fd689529db03294a0d1f8 (patch) | |
tree | cd8adb010f9dac99862a528877ec7513c1fcd804 /libpod | |
parent | 7ae37dcafced4da7fd1e65e6ec41a07220c06542 (diff) | |
parent | 870eed9378c025f3684aa8baf3db6de969da3c5d (diff) | |
download | podman-ade0b3084436f1b9325fd689529db03294a0d1f8.tar.gz podman-ade0b3084436f1b9325fd689529db03294a0d1f8.tar.bz2 podman-ade0b3084436f1b9325fd689529db03294a0d1f8.zip |
Merge pull request #1846 from cgwalters/netns-dns-localhost
Use host's resolv.conf if no network namespace enabled
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_internal_linux.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 99f8652df..6b21bc3d6 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -729,9 +729,10 @@ func (c *Container) generateResolvConf() (string, error) { return "", errors.Wrapf(err, "unable to read %s", resolvPath) } - // Process the file to remove localhost nameservers + // Ensure that the container's /etc/resolv.conf is compatible with its + // network configuration. // TODO: set ipv6 enable bool more sanely - resolv, err := resolvconf.FilterResolvDNS(contents, true) + resolv, err := resolvconf.FilterResolvDNS(contents, true, c.config.CreateNetNS) if err != nil { return "", errors.Wrapf(err, "error parsing host resolv.conf") } |