@@ -977,10 +977,6 @@ func buildContainerConfigMounts(p types.Project, s types.ServiceConfig) ([]mount
977
977
target = configsBaseDir + config .Target
978
978
}
979
979
980
- if config .UID != "" || config .GID != "" || config .Mode != nil {
981
- logrus .Warn ("config `uid`, `gid` and `mode` are not supported, they will be ignored" )
982
- }
983
-
984
980
definedConfig := p .Configs [config .Source ]
985
981
if definedConfig .External {
986
982
return nil , fmt .Errorf ("unsupported external config %s" , definedConfig .Name )
@@ -997,6 +993,10 @@ func buildContainerConfigMounts(p types.Project, s types.ServiceConfig) ([]mount
997
993
continue
998
994
}
999
995
996
+ if config .UID != "" || config .GID != "" || config .Mode != nil {
997
+ logrus .Warn ("config `uid`, `gid` and `mode` are not supported, they will be ignored" )
998
+ }
999
+
1000
1000
bindMount , err := buildMount (p , types.ServiceVolumeConfig {
1001
1001
Type : types .VolumeTypeBind ,
1002
1002
Source : definedConfig .File ,
@@ -1027,10 +1027,6 @@ func buildContainerSecretMounts(p types.Project, s types.ServiceConfig) ([]mount
1027
1027
target = secretsDir + secret .Target
1028
1028
}
1029
1029
1030
- if secret .UID != "" || secret .GID != "" || secret .Mode != nil {
1031
- logrus .Warn ("secrets `uid`, `gid` and `mode` are not supported, they will be ignored" )
1032
- }
1033
-
1034
1030
definedSecret := p .Secrets [secret .Source ]
1035
1031
if definedSecret .External {
1036
1032
return nil , fmt .Errorf ("unsupported external secret %s" , definedSecret .Name )
@@ -1047,6 +1043,10 @@ func buildContainerSecretMounts(p types.Project, s types.ServiceConfig) ([]mount
1047
1043
continue
1048
1044
}
1049
1045
1046
+ if secret .UID != "" || secret .GID != "" || secret .Mode != nil {
1047
+ logrus .Warn ("secrets `uid`, `gid` and `mode` are not supported, they will be ignored" )
1048
+ }
1049
+
1050
1050
if _ , err := os .Stat (definedSecret .File ); os .IsNotExist (err ) {
1051
1051
logrus .Warnf ("secret file %s does not exist" , definedSecret .Name )
1052
1052
}
0 commit comments