浏览代码

warn user secret uid/gid/mode is not supported

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof 2 年之前
父节点
当前提交
150449bbd2
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      pkg/compose/create.go

+ 8 - 0
pkg/compose/create.go

@@ -867,6 +867,10 @@ func buildContainerConfigMounts(p types.Project, s types.ServiceConfig) ([]mount
 			target = configsBaseDir + config.Target
 		}
 
+		if config.UID != "" || config.GID != "" || config.Mode != nil {
+			logrus.Warn("config `uid`, `gid` and `mode` are not supported, they will be ignored")
+		}
+
 		definedConfig := p.Configs[config.Source]
 		if definedConfig.External.External {
 			return nil, fmt.Errorf("unsupported external config %s", definedConfig.Name)
@@ -902,6 +906,10 @@ func buildContainerSecretMounts(p types.Project, s types.ServiceConfig) ([]mount
 			target = secretsDir + secret.Target
 		}
 
+		if secret.UID != "" || secret.GID != "" || secret.Mode != nil {
+			logrus.Warn("secrets `uid`, `gid` and `mode` are not supported, they will be ignored")
+		}
+
 		definedSecret := p.Secrets[secret.Source]
 		if definedSecret.External.External {
 			return nil, fmt.Errorf("unsupported external secret %s", definedSecret.Name)