@@ -20,6 +20,7 @@ import (
20
20
"bytes"
21
21
"context"
22
22
"encoding/json"
23
+ "errors"
23
24
"fmt"
24
25
"os"
25
26
"path"
@@ -804,6 +805,13 @@ func buildContainerConfigMounts(p types.Project, s types.ServiceConfig) ([]mount
804
805
return nil , fmt .Errorf ("unsupported external config %s" , definedConfig .Name )
805
806
}
806
807
808
+ if definedConfig .Driver != "" {
809
+ return nil , errors .New ("Docker Compose does not support configs.*.driver" )
810
+ }
811
+ if definedConfig .TemplateDriver != "" {
812
+ return nil , errors .New ("Docker Compose does not support configs.*.template_driver" )
813
+ }
814
+
807
815
bindMount , err := buildMount (p , types.ServiceVolumeConfig {
808
816
Type : types .VolumeTypeBind ,
809
817
Source : definedConfig .File ,
@@ -843,6 +851,13 @@ func buildContainerSecretMounts(p types.Project, s types.ServiceConfig) ([]mount
843
851
return nil , fmt .Errorf ("unsupported external secret %s" , definedSecret .Name )
844
852
}
845
853
854
+ if definedSecret .Driver != "" {
855
+ return nil , errors .New ("Docker Compose does not support secrets.*.driver" )
856
+ }
857
+ if definedSecret .TemplateDriver != "" {
858
+ return nil , errors .New ("Docker Compose does not support secrets.*.template_driver" )
859
+ }
860
+
846
861
if definedSecret .Environment != "" {
847
862
continue
848
863
}
0 commit comments