summaryrefslogtreecommitdiff
path: root/libpod/container_internal_linux.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-12 12:19:47 -0700
committerGitHub <noreply@github.com>2019-03-12 12:19:47 -0700
commit1c45b42e9ff972d9645735118635e4186e6411f8 (patch)
tree4faabdfa704de5bbc9b6b5c14eae20924771dc4f /libpod/container_internal_linux.go
parentde0192aac79fa409aa84789348de35f7c3d21a71 (diff)
parente6139b4824ca6cc3e2c5041121ff43d0cbbcde52 (diff)
downloadpodman-1c45b42e9ff972d9645735118635e4186e6411f8.tar.gz
podman-1c45b42e9ff972d9645735118635e4186e6411f8.tar.bz2
podman-1c45b42e9ff972d9645735118635e4186e6411f8.zip
Merge pull request #2585 from giuseppe/build-honor-net
build: honor --net
Diffstat (limited to 'libpod/container_internal_linux.go')
-rw-r--r--libpod/container_internal_linux.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index 3f3b22b6b..a7b4aed9f 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -848,6 +848,10 @@ func (c *Container) generateResolvConf() (string, error) {
// Make a new resolv.conf
nameservers := resolvconf.GetNameservers(resolv.Content)
+ // slirp4netns has a built in DNS server.
+ if c.config.NetMode.IsSlirp4netns() {
+ nameservers = append(nameservers, "10.0.2.3")
+ }
if len(c.config.DNSServer) > 0 {
// We store DNS servers as net.IP, so need to convert to string
nameservers = []string{}