Parcourir la source

secrets: only setup secret mount if secrets are requested

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Evan Hazlett il y a 8 ans
Parent
commit
6d12de5369
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      daemon/container_operations_unix.go

+ 4 - 0
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)