validate.go 612 B

1234567891011121314151617181920
  1. package amazon
  2. import (
  3. "github.com/compose-spec/compose-go/types"
  4. "github.com/docker/ecs-plugin/pkg/compose"
  5. )
  6. // Validate check the compose model do not use unsupported features and inject sane defaults for ECS deployment
  7. func (c *client) Validate(project *compose.Project) error {
  8. if len(project.Networks) == 0 {
  9. // Compose application model implies a default network if none is explicitly set.
  10. // FIXME move this to compose-go
  11. project.Networks["default"] = types.NetworkConfig{
  12. Name: "default",
  13. }
  14. }
  15. // Here we can check for incompatible attributes, inject sane defaults, etc
  16. return nil
  17. }