Docker Compose Validator

Used 3,300 times

Paste your docker-compose.yml, run instant checks for syntax, restart policies, resource limits, and env_file references. Download a prettified copy that is safe for CI.

Paste your docker-compose.yml or drop the file. Validation runs instantly.

Version

3.9

Services

2

Volumes

1

Networks

1

env_files

none

Errors & Syntax Issues

Syntax looks good.

Warnings

  • Service "worker" has no restart policy.
  • Service "api" is missing resource limits (deploy.resources.limits).

Latest DevOps articles

Why validate docker-compose?

Docker Compose is the glue between services in local development and staging clusters. A single extra space or a missing colon can keep the stack from starting. The validator mirrors the checks you would normally run with docker compose config and adds best-practice checks for restart policies, env_file usage, and resource limits.

Recommended workflow

  1. Paste or upload your compose file and review the automatic warnings.
  2. Prettify the YAML to enforce two-space indentation and strip trailing whitespace.
  3. Export the cleaned file and commit it or run docker compose config --dry-run locally.

Use the paired guide Docker Compose Validator – Fix YAML before deploy for command-line troubleshooting tips.