YAMLTools logo
Free · no sign-up · in your browser

Docker Compose validator

Paste your docker-compose.yml and get more than "the YAML is valid": broken references between services, undeclared networks and volumes, port clashes and the security risks your team should know about, with a one-click fix when there is one.

Docker Compose
YAML
Loading editor…

Paste a file on the left to validate it.

CREA.MBA
CREA.MBA

Ship your next product faster with AI-ready Next.js

The boilerplate designed for AI to understand your project. Use code YAMLTOOLS for 5% off!

Start Building
Ad

What YAMLTools checks in your Docker Compose file

  • The whole file against the official Compose Specification JSON Schema, including typos in keys such as imgae or enviroment, with a suggested fix.
  • depends_on, links and network_mode pointing to services that do not exist, services that depend on themselves and circular dependencies.
  • Networks, named volumes, secrets and configs used by a service but not declared at the top level.
  • Two services publishing the same host port, duplicated container_name and service_healthy conditions on services without a healthcheck.
  • Variables like ${API_KEY} without a default, env_file and extends that point outside the file, and the obsolete version key.

Risks it flags

  • Privileged containers, dangerous capabilities (ALL, SYS_ADMIN, NET_ADMIN) and the Docker socket mounted inside a container.
  • Passwords, tokens and connection strings written in plain text in environment.
  • Images without a tag or on :latest, which change under your feet on every pull.
  • Databases published on every network interface of the host (0.0.0.0).
  • Services without healthcheck, restart policy or memory and CPU limits.

Common Docker Compose errors

The ones that break a deploy most often, and how YAMLTools reports them.

depends_on points to a missing service

depends_on:
  - databse

Compose refuses to start the project. YAMLTools marks the exact line and tells you which services do exist.

service_healthy without a healthcheck

depends_on:
  db:
    condition: service_healthy

If db does not define a healthcheck (and its image does not either), startup fails. The report explains which service needs one.

Network or volume not declared

networks:
  - backend   # not in networks:

The service uses a network or named volume that is missing from the top-level section, so docker compose up stops.

Your file stays on your computer

Validation, risk analysis, diagram and conversions run in your browser. Nothing is uploaded unless you decide to save it with an account.

Docker Compose validator FAQ

What it checks, how it checks it and what happens with your file.