mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-12 14:37:08 +08:00
bumpo compose-go to v2.1.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
8
vendor/github.com/compose-spec/compose-go/v2/loader/validate.go
generated
vendored
8
vendor/github.com/compose-spec/compose-go/v2/loader/validate.go
generated
vendored
@ -28,7 +28,6 @@ import (
|
||||
|
||||
// checkConsistency validate a compose model is consistent
|
||||
func checkConsistency(project *types.Project) error {
|
||||
containerNames := map[string]string{}
|
||||
for _, s := range project.Services {
|
||||
if s.Build == nil && s.Image == "" {
|
||||
return fmt.Errorf("service %q has neither an image nor a build context specified: %w", s.Name, errdefs.ErrInvalid)
|
||||
@ -145,13 +144,6 @@ func checkConsistency(project *types.Project) error {
|
||||
}
|
||||
}
|
||||
|
||||
if s.ContainerName != "" {
|
||||
if existing, ok := containerNames[s.ContainerName]; ok {
|
||||
return fmt.Errorf(`"services.%s": container name "%s" is already in use by "services.%s": %w`, s.Name, s.ContainerName, existing, errdefs.ErrInvalid)
|
||||
}
|
||||
containerNames[s.ContainerName] = s.Name
|
||||
}
|
||||
|
||||
if s.GetScale() > 1 && s.ContainerName != "" {
|
||||
attr := "scale"
|
||||
if s.Scale == nil {
|
||||
|
Reference in New Issue
Block a user