diff --git a/daemon/container_operations_unix.go b/daemon/container_operations_unix.go index bdadaa7d7f..163dede7a1 100644 --- a/daemon/container_operations_unix.go +++ b/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)