Validating docker-compose yml file

Is there any easy way to verify the syntax, etc of a docker-compose file (docker-compose.yml aka fig.yml) without having to run docker proper?

I am trying to add a quick check to my build / test pipeline to verify my compose files.


Meanwhile this has been added to docker-compose as docker-compose config. Validating your file now is as simple as docker-compose -f docker-compose.yml config. As always, you can omit the -f docker-compose.yml part when running this in the same folder as the file itself or having the COMPOSE_FILE environment variable pointing to your file.