diff --git a/daemon/graphdriver/vfs/driver.go b/daemon/graphdriver/vfs/driver.go index fe4d38230e..47d70fde5c 100644 --- a/daemon/graphdriver/vfs/driver.go +++ b/daemon/graphdriver/vfs/driver.go @@ -47,7 +47,7 @@ func (d *Driver) Create(id, parent string) error { } opts := []string{"level:s0"} if _, mountLabel, err := label.InitLabels(opts); err == nil { - label.Relabel(dir, mountLabel, "") + label.SetFileLabel(dir, mountLabel) } if parent == "" { return nil diff --git a/daemon/volumes.go b/daemon/volumes.go index c9007615c0..16d00dd945 100644 --- a/daemon/volumes.go +++ b/daemon/volumes.go @@ -15,7 +15,6 @@ import ( "github.com/docker/docker/pkg/chrootarchive" "github.com/docker/docker/pkg/symlink" "github.com/docker/docker/volumes" - "github.com/docker/libcontainer/label" ) type Mount struct { @@ -344,12 +343,6 @@ func (container *Container) setupMounts() error { mounts = append(mounts, execdriver.Mount{Source: container.HostsPath, Destination: "/etc/hosts", Writable: true, Private: true}) } - for _, m := range mounts { - if err := label.SetFileLabel(m.Source, container.MountLabel); err != nil { - return err - } - } - container.command.Mounts = mounts return nil }