diff --git a/components/engine/container/container_unix.go b/components/engine/container/container_unix.go index 667eab9ca2..63f2ff9a65 100644 --- a/components/engine/container/container_unix.go +++ b/components/engine/container/container_unix.go @@ -199,6 +199,9 @@ func (container *Container) CopyImagePathContent(v volume.Volume, destination st logrus.Warnf("error while unmounting volume %s: %v", v.Name(), err) } }() + if err := label.Relabel(path, container.MountLabel, true); err != nil && err != syscall.ENOTSUP { + return err + } return copyExistingContents(rootfs, path) }