Docker Compose YAML
Direct answer
Docker Compose configuration is expressed as YAML. Keep indentation consistent, validate before apply/deploy, and use ecosystem-specific dry-run tools plus a general YAML syntax checker.
Typical snippet
services:
web:
image: nginx:alpine
ports:
- "8080:80"
redis:
image: redis:alpineValidation tips
Prefer Compose specification without obsolete version keys when your tooling supports it; validate indentation carefully.
Related
Common YAML pitfalls here
- Indentation mistakes under nested
spec/stepskeys. - Unquoted values that become booleans in some parsers.
- Copy-pasting tabs from chat or docs sites.
After editing, validate syntax on YAML.cc, then run the ecosystem-native checker.