diff options
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r-- | libpod/container_internal.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go index 9f584d2e2..77bba9e85 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -1068,7 +1068,12 @@ func (c *Container) generateResolvConf() (string, error) { return "", errors.Wrapf(err, "error building resolv.conf for container %s") } - return destPath, nil + // Relabel resolv.conf for the container + if err := label.Relabel(destPath, c.config.MountLabel, false); err != nil { + return "", err + } + + return filepath.Join(c.state.DestinationRunDir, "resolv.conf"), nil } // generateHosts creates a containers hosts file |