From bc88c956b66d7c89105e4936c68c301bb3c4a0fb Mon Sep 17 00:00:00 2001 From: Evan Hazlett Date: Fri, 28 Oct 2016 17:16:07 -0700 Subject: [PATCH] secrets: only setup secret mount if secrets are requested Signed-off-by: Evan Hazlett Upstream-commit: 6d12de53699d6fa03c70493eec63ac5cfa41f2fe Component: engine --- components/engine/daemon/container_operations_unix.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/engine/daemon/container_operations_unix.go b/components/engine/daemon/container_operations_unix.go index bdadaa7d7f..163dede7a1 100644 --- a/components/engine/daemon/container_operations_unix.go +++ b/components/engine/daemon/container_operations_unix.go @@ -145,6 +145,10 @@ func (daemon *Daemon) setupIpcDirs(c *container.Container) error { } func (daemon *Daemon) setupSecretDir(c *container.Container) (setupErr error) { + if len(c.Secrets) == 0 { + return nil + } + localMountPath := c.SecretMountPath() logrus.Debugf("secrets: setting up secret dir: %s", localMountPath)