Docker Compose Validator

Validate and lint docker-compose.yml files instantly. Detect errors, warnings, deprecated keys, and structural issues. Free, fast, and 100% client-side.

docker-compose.yml
Load .yml / .yaml file
Services
Issues

FAQ

What does this validator check?
It validates the structure of docker-compose.yml files: required keys (services), service definitions (image/build), port formats, volume mounts, environment variables, depends_on references, network and volume definitions, and deprecated or mixed-version keys.
Does it support all Compose versions?
It detects and adapts to Compose spec v2, v2.1, v3.0 through v3.9, and latest (no version key). Lint rules vary by version — for example, cpu_shares and mem_limit are deprecated in v3.
Is my compose file sent to a server?
No. All parsing and validation happens entirely in your browser. Your compose file never leaves your device.
Can I load a file from disk?
Yes. Click the file input to select a .yml or .yaml file. It will be read locally using the FileReader API and loaded into the textarea.
What YAML features are supported?
The validator uses a minimal indentation-based parser that handles common docker-compose patterns: key-value pairs, lists (with - prefix), quoted strings, and nested structures. Full YAML features like anchors, aliases, and multi-line blocks may not parse perfectly.
Why does my file report a missing 'services' key?
The parser found no top-level services: block. Check that indentation uses consistent spaces (2 per level), the key is spelled services, and it sits at the top level of the file — not nested under another key.
Which deprecated keys does the validator flag?
In Compose v3: cpu_shares, mem_limit, memswap_limit, cpu_quota and cpuset (moved to deploy.resources). In all versions: links. Each hit is reported with its line number.
What port formats are valid in docker-compose.yml?
Short syntax like '80:80', '127.0.0.1:80:80' or '8080:80/udp', plus long syntax with target/published. The validator rejects ports outside 1–65535 and malformed host:container pairs.

Related Tools

SimpyToolUtilities HubDocker Compose Validator >