Merge pull request #23024 from rhatdan/selinux
We need to relabel newly created container volumes
This commit is contained in:
commit
6b4fd5f071
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…
Add table
Reference in a new issue