mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Do not relabel if user did not request it for non local volumes
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
8ae0192943
commit
843a119d49
1 changed files with 3 additions and 1 deletions
|
@ -128,7 +128,9 @@ func (daemon *Daemon) registerMountPoints(container *container.Container, hostCo
|
|||
// bind.Name is an already existing volume, we need to use that here
|
||||
bind.Driver = v.DriverName()
|
||||
bind.Named = true
|
||||
bind = setBindModeIfNull(bind)
|
||||
if bind.Driver == "local" {
|
||||
bind = setBindModeIfNull(bind)
|
||||
}
|
||||
}
|
||||
if label.RelabelNeeded(bind.Mode) {
|
||||
if err := label.Relabel(bind.Source, container.MountLabel, label.IsShared(bind.Mode)); err != nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue