mirror of https://github.com/containers/podman.git
slirp4netns: add builtin DNS server to resolv.conf
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
06e444124f
commit
e6139b4824
|
@ -835,6 +835,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{}
|
||||
|
|
Loading…
Reference in New Issue