↑ ↓ select, Enter open, Esc close

Validate a Docker Compose file

Adjust the values, the command updates live
root@server
docker compose -f /opt/app/compose.yaml config --quiet && echo "Konfiguration OK"

Reads the Compose file, substitutes variables from the environment and the .env file and checks syntax and structure. On errors, Compose names the location, otherwise the confirmation appears. Without --quiet, the fully resolved configuration is printed, which is handy for checking whether variables are substituted correctly.

Note: The resolved output contains passwords from .env in plain text. Docker commands require root or the docker group.

Also searched as

  • validate docker compose file
  • docker compose config check syntax
  • check env variables in compose file

Related one-liners

All in Docker

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.