secrets: only setup secret mount if secrets are requested

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
Evan Hazlett 2016-10-28 17:16:07 -07:00
parent e63dc5cde4
commit 6d12de5369
1 changed files with 4 additions and 0 deletions

View File

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