Skip to content

Commit

Permalink
rootless: use the slirp4netns builtin DNS first
Browse files Browse the repository at this point in the history
When using slirp4netns, be sure the built-in DNS server is the first
one to be used.

Closes: containers#3277

Signed-off-by: Giuseppe Scrivano <[email protected]>
  • Loading branch information
giuseppe committed Jun 12, 2019
1 parent d4681fa commit 0e34d90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libpod/container_internal_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ func (c *Container) generateResolvConf() (string, error) {
nameservers := resolvconf.GetNameservers(resolv.Content)
// slirp4netns has a built in DNS server.
if c.config.NetMode.IsSlirp4netns() {
nameservers = append(nameservers, "10.0.2.3")
nameservers = append([]string{"10.0.2.3"}, nameservers...)
}
if len(c.config.DNSServer) > 0 {
// We store DNS servers as net.IP, so need to convert to string
Expand Down

0 comments on commit 0e34d90

Please sign in to comment.