79218766

Date: 2024-11-23 20:31:39
Score: 1.5
Natty:
Report link

Levan explain it right: there are syntax errors in ports and volumes - to define list in yaml you need to have a space after dash (- something) and not -something.

But I want to add that if you want to check your configuration before start you should use command docker compose config which would catch schema issues like this:

validating /path/to/docker-compose-linter/docker-compose.yml: services.app.volumes must be a list

Or special docker compose linter which also catch schema issues, but additionally could provide recommendations for improving your Compose file:

   1:1     error  ComposeValidationError: instancePath="/services/app/ports", schemaPath="#/properties/ports/type", message="Validation error: must be array".  invalid-schema

✖ 1 problems (1 errors, 0 warnings)
Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Contains signature (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: zavoloklom