diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2018-08-31 17:20:13 +0200 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-08-31 17:37:20 +0000 |
commit | 294c3f4cab3c5945e420a55263a7bece8a7030a1 (patch) | |
tree | e022620b48d6cbee06eb341401abcd3150a7b3f1 /libpod/container_internal.go | |
parent | 6d067fcba2bf84fb5e7c7691b796d42d67028176 (diff) | |
download | podman-294c3f4cab3c5945e420a55263a7bece8a7030a1.tar.gz podman-294c3f4cab3c5945e420a55263a7bece8a7030a1.tar.bz2 podman-294c3f4cab3c5945e420a55263a7bece8a7030a1.zip |
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
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r-- | libpod/container_internal.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go index 1c6143cd2..79bc49c37 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -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 } |