GitHub - NtWriteCode/docker-pre-commit-universal: Pre-Commit hooks for validating Docker projects, now it's platform-independent finally

A set of pre-commit hooks for Docker services

Installation

Add the following to your .pre-commit-config.yaml file

  - repo: https://github.com/NtWriteCode/docker-pre-commit-universal
    rev: v4.0.2
    hooks:
      - id: docker-compose-check

and then run pre-commit autoupdate.

Hooks

docker-compose-check

Verifies that docker compose files are valid by using docker compose config to parse them.

This repository is the for of IamTheFij/docker-pre-commit, because that originally used a shell script, which was failing on Windows. I just quickly rewrote it on python, so it works cross-platform.