Skip to content

Docker Compose validator

Inspect a supported Compose subset for service types, dependencies and structural issues entirely locally.

This tool reports supported structural checks only. It does not run docker compose config.

Compose structure
Checked subset looks consistent
2Services
0Errors
0Unsupported
webnginx:alpine

Depends on:cache

8080:80
cacheredis:alpine

Depends on:none

No runtime, environment, deployment or security validation is performed.

Processed on your device

How it works & useful details

How it works & supported syntax

Local structural checks for up to 30 services. Checks common string/boolean fields, image/build presence, short ports/volumes, environment types, simple depends_on names and cycles. Unknown properties and complex forms are marked unsupported, not silently approved. Environment interpolation, referenced files, image availability, deployment compatibility and security are not verified.

YAML input uses the shared conservative subset: two-space mappings and sequences, comments, quoted/plain scalars and empty collections. No anchors, aliases, tags, block scalars or flow collections. Choose JSON for a JSON Compose document. Input limit 100,000 characters; YAML parser limit 32 levels and 20,000 values.

Local workspace

Your input stays in this page. These tools calculate or process text; they do not run commands, start containers, contact servers or change settings on your device.

Previews pause above 20,000 combined characters. Use the action to process the full supported input. Exports contain the complete result within the tool’s stated limits.

About this tool

Docker Compose validator inspects a supported subset of a Compose file for service definitions, dependencies, and structural problems. It catches the mistakes that normally only appear when you run the stack.

The file is parsed as text and no container command is executed; images are not pulled and no daemon is contacted. The report states which parts of the subset it checked and what it left alone.

How to use it

  1. Paste the Compose YAML file.
  2. Run the validation to see service and structure checks.
  3. Read the reported errors and warnings, including unsupported keys.
  4. Fix the file and validate again before running the stack.

Worked example

services:
  web:
    image: nginx
    depends_on:
      - api
  api:
    build: .
    depends_on:
      - web
  worker:
    restart: always

produces two errors: services.worker has neither an image nor a build context, and web and api depend on each other, a cycle that Compose cannot start. Both are problems docker compose up would only report when you try to run the stack.

What the check covers

The validator reads the common Compose fields: image and build, ports and volumes in short syntax, environment as a list or mapping, restart, and depends_on as a list of service names. It checks types, missing references, and dependency cycles for up to 30 services. Unknown or complex fields are marked as unsupported instead of being silently accepted.

It does not interpolate ${VARIABLES}, read .env or referenced files, pull images, or check whether ports are free. For the definitive answer, run docker compose config, which prints the fully resolved file or the exact error. Use this tool for a private first pass, such as reviewing a Compose file from a tutorial or a pull request.

Frequently asked questions

Does it need Docker installed?

No. It is a text analysis of the YAML subset and runs entirely in your browser.

Does it validate environment variable interpolation?

Interpolation depends on the shell and files in your project, so it is reported as unsupported rather than evaluated.

What are the limits?

Up to 100,000 characters of YAML text per run.

Is the version: field required?

No. The Compose Specification made the top-level version field obsolete. Current Docker Compose ignores it and warns when it is present.