container: resolve rootfs symlinks

Prevent a runc error that doesn't like symlinks as part
of the rootfs.

Closes: https://github.com/containers/libpod/issues/1389

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1390
Approved by: rhatdan
This commit is contained in:
Giuseppe Scrivano
2018-08-31 17:20:13 +02:00
committed by Atomic Bot
parent 6d067fcba2
commit 294c3f4cab

View File

@ -1295,6 +1295,10 @@ func (c *Container) mount() (string, error) {
if err != nil {
return "", errors.Wrapf(err, "error mounting storage for container %s", c.ID())
}
mountPoint, err = filepath.EvalSymlinks(mountPoint)
if err != nil {
return "", errors.Wrapf(err, "error resolving storage path for container %s", c.ID())
}
return mountPoint, nil
}