From b3bb606513182224c93e87aece31e8884fb2f223 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Wed, 23 Sep 2015 10:07:18 -0700 Subject: [PATCH] Change mount dest after resolving symlinks We need to update the mount's destination after we resolve symlinks so that it properly creates and mounts the correct location. Signed-off-by: Michael Crosby --- libcontainer/rootfs_linux.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libcontainer/rootfs_linux.go b/libcontainer/rootfs_linux.go index 51f961df..6d258569 100644 --- a/libcontainer/rootfs_linux.go +++ b/libcontainer/rootfs_linux.go @@ -158,6 +158,8 @@ func mountToRootfs(m *configs.Mount, rootfs, mountLabel string) error { if err := checkMountDestination(rootfs, dest); err != nil { return err } + // update the mount with the correct dest after symlinks are resolved. + m.Destination = dest if err := createIfNotExists(dest, stat.IsDir()); err != nil { return err }