Docker Compose Validator
Paste a docker-compose.yml to validate
Or click "Load Sample" to try a working example
Validation checks performed
Validates top-level keys, version format, services presence, and ensures each service is a valid mapping.
Checks image/build presence, valid service keys, port mappings, volume mounts, environment variables, and restart policies.
Verifies depends_on targets exist, network references match defined networks, and named volumes are declared.
Detects typos (port vs ports, volume vs volumes), circular dependencies, and unusual configuration values.
Last updated:
This tool is provided as-is for convenience. Output should be verified before use in any production or critical context.
Programmatic Access
Docker Compose Validator is also callable as a free HTTP JSON API at
https://aidevhub.io/api/docker-compose-validator/ — GET with query
parameters or POST with a JSON body, no authentication, CORS enabled,
50 requests/day per IP. Responses return
{ ok, tool, result, meta }.
curl -s -X POST https://aidevhub.io/api/docker-compose-validator/ \
-H "Content-Type: application/json" \
-d '{"content":"services:\n web:\n image: nginx:1.27\n ports:\n - 8080:80"}' Machine-readable contract: /api/tool/docker-compose-validator.json All API endpoints: /agents/ LLM site index: /llms.txt
Agent Invocation
Best Path For Builders
Dedicated API endpoint
Deterministic outputs, machine-safe contracts, and production-ready examples.
Dedicated API
https://aidevhub.io/api/docker-compose-validator/ OpenAPI: https://aidevhub.io/api/openapi.yaml
Unified Runtime API
https://aidevhub.io/api/tools/run/?toolId=docker-compose-validator&a=...
GET and POST are supported at /api/tools/run/ with identical validation and limits.
Limit: 10 req / 60s, input max 512 KB.
How to Use Docker Compose Validator
- 1
Paste your docker-compose.yml
Copy your entire docker-compose file and paste it into the validator. It checks YAML syntax and Docker Compose structure immediately.
- 2
Review validation results
See a list of errors, warnings, and info messages with line numbers. Common issues: undefined services, missing dependencies, invalid syntax.
- 3
Fix common errors
Errors like 'service not found' indicate a service reference that doesn't exist. 'Invalid version' means your Compose file version is outdated.
- 4
Check service dependencies and networks
The validator shows which services depend on others and whether they're on the same network. Fix connectivity issues before deploying.
- 5
Verify secrets and volume mounts
Ensure all volume paths exist and secret names are consistent. The validator flags paths that may not exist or volumes defined incorrectly.