summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_internal_linux.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index 86a28c176..3bdf28e8c 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -1383,6 +1383,11 @@ func (c *Container) generateResolvConf() (string, error) {
return "", err
}
+ // Determine if symlink points to any of the systemd-resolved files
+ if strings.HasPrefix(resolvPath, "/run/systemd/resolve/") {
+ resolvPath = "/run/systemd/resolve/resolv.conf"
+ }
+
contents, err := ioutil.ReadFile(resolvPath)
if err != nil {
return "", errors.Wrapf(err, "unable to read %s", resolvPath)