From ddba9dffe54ae9df762dd3ccb0e0e4a6b23ef0b9 Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Tue, 2 Feb 2016 15:02:37 +0100 Subject: [PATCH] Do not relabel if user did not request it for non local volumes Signed-off-by: Dan Walsh Upstream-commit: 843a119d49d2b4ba0a15188843b28763b13e62c6 Component: engine --- components/engine/daemon/volumes.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/engine/daemon/volumes.go b/components/engine/daemon/volumes.go index 71ec70a1f6..d32715997d 100644 --- a/components/engine/daemon/volumes.go +++ b/components/engine/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 {