Validate a Docker Compose file
validate docker compose file | docker compose config check syntax | check env variables in compose file | docker | compose | validation | yamldocker 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