From ca040b1a377c467a9504ffa256ae77d9e3d29f0c Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Tue, 13 May 2014 10:54:08 -0700 Subject: [PATCH] Update code to handle new path to Follow Symlink func Docker-DCO-1.1-Signed-off-by: Michael Crosby (github: crosbymichael) --- daemon/volumes.go | 4 ++-- pkg/libcontainer/mount/init.go | 4 ++-- server/buildfile.go | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/daemon/volumes.go b/daemon/volumes.go index a15e3084b2..ac01c6a982 100644 --- a/daemon/volumes.go +++ b/daemon/volumes.go @@ -10,7 +10,7 @@ import ( "github.com/dotcloud/docker/archive" "github.com/dotcloud/docker/daemon/execdriver" - "github.com/dotcloud/docker/utils" + "github.com/dotcloud/docker/pkg/symlink" ) type BindMap struct { @@ -213,7 +213,7 @@ func createVolumes(container *Container) error { } // Create the mountpoint - rootVolPath, err := utils.FollowSymlinkInScope(filepath.Join(container.basefs, volPath), container.basefs) + rootVolPath, err := symlink.FollowSymlinkInScope(filepath.Join(container.basefs, volPath), container.basefs) if err != nil { return err } diff --git a/pkg/libcontainer/mount/init.go b/pkg/libcontainer/mount/init.go index 16fb758e57..e5f2b43cab 100644 --- a/pkg/libcontainer/mount/init.go +++ b/pkg/libcontainer/mount/init.go @@ -11,8 +11,8 @@ import ( "github.com/dotcloud/docker/pkg/label" "github.com/dotcloud/docker/pkg/libcontainer" "github.com/dotcloud/docker/pkg/libcontainer/mount/nodes" + "github.com/dotcloud/docker/pkg/symlink" "github.com/dotcloud/docker/pkg/system" - "github.com/dotcloud/docker/utils" ) // default mount point flags @@ -129,7 +129,7 @@ func setupBindmounts(rootfs string, bindMounts libcontainer.Mounts) error { return err } - dest, err = utils.FollowSymlinkInScope(dest, rootfs) + dest, err = symlink.FollowSymlinkInScope(dest, rootfs) if err != nil { return err } diff --git a/server/buildfile.go b/server/buildfile.go index eeafbb5b4c..faaac0d3d4 100644 --- a/server/buildfile.go +++ b/server/buildfile.go @@ -20,6 +20,7 @@ import ( "github.com/dotcloud/docker/archive" "github.com/dotcloud/docker/daemon" "github.com/dotcloud/docker/nat" + "github.com/dotcloud/docker/pkg/symlink" "github.com/dotcloud/docker/registry" "github.com/dotcloud/docker/runconfig" "github.com/dotcloud/docker/utils" @@ -404,7 +405,7 @@ func (b *buildFile) addContext(container *daemon.Container, orig, dest string, r ) if destPath != container.RootfsPath() { - destPath, err = utils.FollowSymlinkInScope(destPath, container.RootfsPath()) + destPath, err = symlink.FollowSymlinkInScope(destPath, container.RootfsPath()) if err != nil { return err }