Skip to content
LatchkeyLatchkey home

docker compose config Command Reference

Validate and render the resolved compose configuration.

docker compose config parses, merges, and interpolates the compose files plus environment, then prints the fully resolved configuration. In CI it is a fast validation gate: a malformed file or undefined variable fails here before any container starts.

Common flags

  • -q, --quiet - validate only, print nothing (exit code signals validity)
  • --services - list the service names
  • --volumes - list the volume names
  • --no-interpolate - do not substitute environment variables
  • --format - output format, e.g. json or yaml

Example

shell
docker compose config -q
docker compose config --services

In CI

Add docker compose config -q as a lint step early in the pipeline so syntax errors and unset required variables fail fast with a clear message, instead of surfacing as a confusing failure during compose up. The non-zero exit code makes it a clean gate.

Key takeaways

  • config -q is a fast fail-fast validation gate for compose files.
  • It surfaces unset required variables before any container starts.
  • --services and --volumes enumerate names for downstream scripting.

Frequently asked questions

docker compose config Command Reference?
docker compose config parses, merges, and interpolates the compose files plus environment, then prints the fully resolved configuration. In CI it is a fast validation gate: a malformed file or undefined variable fails here before any container starts.
In CI?
Add docker compose config -q as a lint step early in the pipeline so syntax errors and unset required variables fail fast with a clear message, instead of surfacing as a confusing failure during compose up. The non-zero exit code makes it a clean gate.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card