Переглянути джерело

Do not relabel if user did not request it for non local volumes

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Dan Walsh 9 роки тому
батько
коміт
843a119d49
1 змінених файлів з 3 додано та 1 видалено
  1. 3 1
      daemon/volumes.go

+ 3 - 1
daemon/volumes.go

@@ -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 {