A docker image containing pre-commit along with useful tools for many projects
This image provides pre-commit with many cross-project tools. This includes style and syntax checkers for Docker, shell scripts and many configuration languages, such as yaml.
- docker-compose
- shellcheck
- shfmt
- yamllint
Switch into your source code directory (git) and run:
docker run --rm -it -v "${PWD}:/src" -w /src petzi/pre-commit-common:latest
There is a pre-commit rule installed to fix shfmt formatting. It is defined for manual runs only, so you will have to use a command like this:
docker run --rm -it -v "${PWD}:/src" -w /src petzi/pre-commit-common --hook-stage manual shfmt-fix