We need to relabel newly created container volumes
This will add a label to any volume that is shared into a container. Signed-off-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
a110512e38
commit
5a277c8a4a
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue