Paste your docker-compose.yml to validate syntax, check service definitions, detect circular dependencies, and lint for best practices. 100% client-side.
Load sample:
Validation Results
Results will appear here after validation...
Service Dependency Graph
Frequently Asked Questions
What does a Docker Compose validator check?▼
A Docker Compose validator checks your docker-compose.yml for valid YAML syntax, required top-level keys like 'services', correct service definitions with 'image' or 'build', valid port mapping formats and ranges, volume mount syntax, network references matching defined networks, environment variable formats, restart policies, depends_on references to existing services, and circular dependency detection.
Do I need a 'version' key in docker-compose.yml?▼
Since Docker Compose V2, the 'version' key is optional and considered obsolete. Modern Docker Compose files only need a top-level 'services' key. If you include 'version', it is simply ignored by the latest Docker Compose CLI. This validator accepts files with or without the version key but will warn you that it is deprecated.
What are common Docker Compose errors?▼
Common errors include YAML indentation mistakes (tabs instead of spaces), missing 'image' or 'build' in a service, invalid port mappings with out-of-range port numbers, referencing undefined networks or volumes, depends_on pointing to non-existent services, circular dependencies between services, environment variables with spaces in names, and invalid restart policies.
How do I fix circular dependencies in Docker Compose?▼
Circular dependencies occur when service A depends on B, and B depends on A (directly or through a chain). To fix them, remove one of the depends_on entries and use healthchecks or startup scripts to handle ordering. You can also use the 'condition' option in depends_on (e.g., service_healthy) to create more flexible startup dependencies without circular chains.
What are valid Docker Compose port mapping formats?▼
Valid port mapping formats include: '80' (container port only), '8080:80' (host:container), '127.0.0.1:8080:80' (ip:host:container), '8080-8090:80-90' (port ranges), and any of these with '/tcp' or '/udp' suffix. Port numbers must be between 1 and 65535. Always quote port mappings in YAML to avoid parsing issues with the colon character.