# docker compose config: Validate & Render Compose

> How docker compose config works: validating and rendering the merged compose file with variables resolved, for CI linting.

Source: https://latchkey.dev/learn/command-reference/docker-compose-config  
Updated: 2026-06-25

Validate and print the fully-resolved compose configuration.

docker compose config parses, merges, and interpolates your compose files and prints the canonical result - or errors. This page covers validation and inspecting the merged config in CI.

## What it does

docker compose config validates the compose file(s), applies overrides and variable interpolation, and prints the resolved configuration. It is the way to lint a compose file and see exactly what up will run.

## Common usage

```Terminal
docker compose config
docker compose config --quiet            # validate only, no output
docker compose config --services
docker compose config --images
```

## Common errors in CI

config is the lint step: "services.api.ports.0: invalid ... " or "yaml: line N: ..." surface schema and YAML errors before up. A frequent gotcha is "variable is not set. Defaulting to a blank string" - an unset ${VAR} interpolates to empty; set it or give a default with ${VAR:-fallback}. Run docker compose config --quiet in CI to fail fast on an invalid file.

## FAQ

### docker compose config: Validate & Render Compose?

docker compose config parses, merges, and interpolates your compose files and prints the canonical result - or errors. This page covers validation and inspecting the merged config in CI.

### What it does?

docker compose config validates the compose file(s), applies overrides and variable interpolation, and prints the resolved configuration. It is the way to lint a compose file and see exactly what up will run.

### Common errors in CI?

config is the lint step: "services.api.ports.0: invalid ... " or "yaml: line N: ..." surface schema and YAML errors before up. A frequent gotcha is "variable is not set. Defaulting to a blank string" - an unset ${VAR} interpolates to empty; set it or give a default with ${VAR:-fallback}.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
