docker compose config: Validate & Render Compose
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
docker compose config
docker compose config --quiet # validate only, no output
docker compose config --services
docker compose config --imagesCommon 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.