Home
Docker Compose File Validator & Spec Linter
DevOps & Containerization

Docker Compose File Validator & Spec Linter

Validate docker-compose.yml files against the official Compose Spec. Detect syntax errors, host port overlaps, undeclared named volumes, broken networks, and container security vulnerabilities completely client-side.

Valid Compose Spec
0 warnings, 1 security alert
Presets:
4
Services
2
Host Ports
5
Volumes
2
Networks
0
Errors
1
Security Audit
docker-compose.yml(81 lines)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Tab: 2 spaces

Plaintext Secret in Environment: 'POSTGRES_PASSWORD_FILE'service: db

Service 'db' contains hardcoded credentials in environment variable 'POSTGRES_PASSWORD_FILE'.

security
Recommendation:Reference environment variables from .env file (e.g., 'POSTGRES_PASSWORD_FILE: ${POSTGRES_PASSWORD_FILE}') or use Docker Compose secrets.

Zero-Knowledge Local Execution

All data processing, parsing, and compilation execute strictly inside your local browser memory. Zero external server uploads.

Instant Client-Side Engine

Instant real-time reactive computation delivers immediate feedback on every keystroke with zero network latency.

Production Standards & Compliance

Strictly validates syntax, edge cases, and formatting rules for dependable production output.

Technical Reference & Architecture Guide

Docker Compose File Validator & Spec Linter — Reference Guide

Validate docker-compose.yml files against the official Compose Spec. Detect syntax errors, host port overlaps, undeclared named volumes, broken networks, and container security vulnerabilities client-side.

Docker Compose File Validator & Spec Linter — Reference Guide — Client-Side In-Memory Architecture & Data Flow
Docker Compose File Validator & Spec Linter — Reference Guide — Client-Side In-Memory Architecture & Data Flow

Key Parameters & Controls

Key Parameters & Controls
ParameterType / UnitDescriptionDefault
servicesmap[string]ServiceTop-level mapping defining containerized service specifications, images, and runtime flags.Required
portsarray[string]Published host-to-container port mappings. Should be string-quoted (e.g., '8080:80') to avoid YAML base-60 sexagesimal parsing errors.Optional
volumesarray[string] | mapMounts host folders (bind mounts) or persistent managed volumes (named volumes) into containers.Optional
depends_onmap | array[string]Controls service startup order and conditions (e.g. condition: service_healthy).Optional

Pro Tips & Best Practices

Deprecate Top-Level 'version'

In Compose Spec (Docker v2+), the top-level 'version' attribute is obsolete. Removing it enables modern spec feature parity without schema warnings.

Quote All Port Definitions

Always wrap port mappings in quotes (e.g. '80:80'). Unquoted ports like 22:22 can be interpreted by YAML 1.1 parsers as base-60 floating timestamps.

Healthcheck-Gated Dependencies

Use 'depends_on: { db: { condition: service_healthy } }' so application containers wait for PostgreSQL or MySQL socket readiness before booting.

Common Gotchas & Troubleshooting

⚠️Port collision or host socket already allocated error during up

Scan all service definitions for identical host ports (e.g. multiple services binding to port 8080) and map them to distinct host ports or route through an Nginx proxy.

⚠️Named volume declared in service but undeclared at top level

Any volume mounted as 'vol_name:/path' must be registered under the global root 'volumes:' key at the bottom of the file.

Frequently Asked Questions

Why is the top-level 'version' tag deprecated in Docker Compose?▼

Docker donated Compose to the open Compose Specification in 2020. Modern Docker Compose v2 treats all Compose files uniformly, rendering the old version: '3' or '2' distinction obsolete.

How does client-side Compose validation guarantee data privacy?▼

All YAML AST parsing, port overlap checking, and dependency graph checks execute in your browser's local memory. Zero bytes of your infrastructure blueprints are transmitted across the web.

What is the difference between a bind mount and a named volume?▼

Bind mounts map a direct host filesystem path (e.g. ./app:/src) into the container, whereas named volumes (e.g. pg_data:/var/lib/data) are managed within Docker's private storage area and persist across rebuilds.

How does healthcheck-based dependency order prevent race conditions?▼

Standard 'depends_on' only waits until a container process starts. 'condition: service_healthy' monitors actual socket availability and internal health probes before releasing dependent services.