Skip to content
ZeroServer.tools

Docker Compose Validator

Validate Docker Compose files — YAML syntax, required fields, port mappings, and undefined depends_on / volume / network references.

Drop a file or click to browse

Compose files often contain secrets (passwords, API keys) — this file stays in your browser and is never added to the shareable page URL.

Validating…

About Docker Compose Validator

Docker Compose defines multi-container applications in a YAML file. Beyond YAML syntax and required fields, this validator catches the mistakes that pass a plain YAML check but break docker compose up: a depends_onthat names a service which isn’t defined, and a service volumes: or networks:reference that isn’t declared at the top level. It also accepts real port syntaxes (host-IP bindings and ranges like 127.0.0.1:8080:80 and 8000-8010:8000-8010), flags the deprecated version key, and reformats the file. Everything runs locally in your browser. Compatible with Compose v2 and the Compose Specification.

Built and maintained by Meet Shah · Last updated

What this tool is used for

  • Catching a YAML or schema error before a deploy fails on a server.
  • Checking a compose file after a merge that touched several services.
  • Reviewing a file from a colleague when you have no Docker host handy.
  • Spotting a version-incompatible key before it is silently ignored.
  • Sanity-checking a file copied from a tutorial before running it.

Frequently Asked Questions

What does it check in a Compose file?
That the YAML parses, that `services` exists and each service has an `image` or a `build`, and that references between services resolve — a `depends_on` naming a service that is not defined is the error most often introduced by editing.
Why must a port mapping be quoted?
Because YAML reads an unquoted `8000:8000` as a sexagesimal number in some parsers, which silently becomes a different value. Quoting is the documented convention for exactly that reason, and it is why every example in the Docker docs has quotes around ports.
What does binding to 127.0.0.1 change?
It publishes the port only on the loopback interface instead of every interface. `8080:80` exposes the container to your whole network, including anyone on the same Wi-Fi — `127.0.0.1:8080:80` does not. It is the single most consequential character in a Compose file.
Is the version key still needed?
No. The Compose Specification dropped it and current versions of `docker compose` warn that it is obsolete. It persists in older files and in CI systems still running Compose v1, which is the only reason to keep it.
Does depends_on wait for the service to be ready?
Only for it to have STARTED, which is not the same thing. A database container is running long before it accepts connections, so an application that depends on it can still fail on boot. A healthcheck with `condition: service_healthy` is what actually waits.

Common errors and gotchas

  • Treating a syntax pass as a working stack. Valid structure says nothing about whether the services start.
  • Indenting a key under the wrong service, which parses and applies to something unintended.
  • Using a key that the declared version does not support, which is often ignored rather than rejected.
  • Assuming environment interpolation is resolved, when it happens at runtime from the shell and .env.
  • Relying on this instead of Docker's own config command, which is the authority on its own schema.

Related Formatters & Validators tools

Private & free — this tool runs entirely in your browser.

IndieKitShip your Next.js startup in days.affiliate