DevGrill

Docker Compose Validator

Check a docker-compose.yml against the official spec, plus broken references and risky settings.

Runs in your browser

0 chars

Results

Paste a docker-compose.yml or compose.yaml to check it.

What Compose checks, and what it doesn't

docker compose up stops at the first problem, often with a terse message. Paste your docker-compose.yml or compose.yaml and see every problem at once, each with its line. The file is checked against the official Compose Specification schema, the same rules Docker Compose uses, so misspelled keys like portz and wrong value types are caught.

It also checks things a schema can't: depends_on naming a service that doesn't exist, named volumes and networks used but not declared, images without a pinned version, container_name combined with several replicas, and port mappings like 22:22 that some YAML parsers misread unless quoted. Anchors and << merge keys are understood, and notes point out secrets written straight into the file.

How to use the Docker Compose Validator

  1. Paste your Compose file. Or load the sample, which has a few typical mistakes.

  2. Read the findings. Errors stop Compose from running; warnings and notes are worth fixing. Click line N to jump to it.

  3. Fix and recheck. Results update as you type.

Tips

  • The top-level version: key is obsolete in Compose v2; delete it.
  • Pin images to a version (postgres:16, not postgres) so a rebuild doesn't silently upgrade.
  • Variables like ${TAG} are left as written; values come from your .env at run time, so check that file with the .env Parser.

Frequently asked questions

Which Compose versions are covered?

The current Compose Specification, used by Docker Compose v2 (docker compose). Old v2 and v3 file formats mostly still fit it.

Does it check that images or build paths exist?

No. That needs your registry and file system; DevGrill doesn't contact other servers or read your disk.

Is the schema up to date?

It's the official schema from the compose-spec project (Apache 2.0 license), bundled with DevGrill and updated with the site.

Is my file uploaded?

No. Checking happens in your browser, so passwords in the file stay on your device.

Related tools