Validating Docker Compose files with a pre-commit hook

The Problem We have all run into this issue - you’re mid getting a service ready to deploy or update, and you make an on-the-fly change to a compose file, to update a health-check, change a deploy parameter or modify the update interval, and then, when you go to deploy the service… yaml: line 12: did not find expected key Dang! What a mess up, now we have to go back, fix the issue (hopefully test it a bit better) re-commit to the code base, potentially re run test steps, and trigger redeployments.