We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e2df0ed + a5f1d1a commit 0d0962dCopy full SHA for 0d0962d
loader/validate.go
@@ -36,6 +36,19 @@ func checkConsistency(project *types.Project) error {
36
if s.Build.DockerfileInline != "" && s.Build.Dockerfile != "" {
37
return errors.Wrapf(errdefs.ErrInvalid, "service %q declares mutualy exclusive dockerfile and dockerfile_inline", s.Name)
38
}
39
+
40
+ if len(s.Build.Platforms) > 0 && s.Platform != "" {
41
+ var found bool
42
+ for _, platform := range s.Build.Platforms {
43
+ if platform == s.Platform {
44
+ found = true
45
+ break
46
+ }
47
48
+ if !found {
49
+ return errors.Wrapf(errdefs.ErrInvalid, "service.build.platforms MUST include service.platform %q ", s.Platform)
50
51
52
53
54
for network := range s.Networks {
0 commit comments