I think somewhat related is issue #418
I’m trying to figure out how to run the prebuilt docker image ghcr.io/antonbabenko/pre-commit-terraform as a git hook using either the docker_image or system language. There seem to be multiple problems:
-
The docker image requires a .pre-commit-config.yaml on the host and that collides with my own configuration to control the git hooks in my repo.
-
Using prek and using two separate config files solved 1. but I’m not able to run the image because
- the
docker_image language doesn’t allow me to set --volume and --workdir, and
- the
docker_image language doesn’t execute $(id -u) to construct the USERID environment variable, and
- the
system language has the same constraints.
I also wasn’t able to correlate the repo version tags (e.g. v1.108.1) with the docker image tags shown here.
Could you please provide some guidance and documentation about how to run the docker image as a git hook on a local repo? Thank you!
I think somewhat related is issue #418
I’m trying to figure out how to run the prebuilt docker image
ghcr.io/antonbabenko/pre-commit-terraformas a git hook using either thedocker_imageorsystemlanguage. There seem to be multiple problems:The docker image requires a
.pre-commit-config.yamlon the host and that collides with my own configuration to control the git hooks in my repo.Using prek and using two separate config files solved 1. but I’m not able to run the image because
docker_imagelanguage doesn’t allow me to set--volumeand--workdir, anddocker_imagelanguage doesn’t execute$(id -u)to construct theUSERIDenvironment variable, andsystemlanguage has the same constraints.I also wasn’t able to correlate the repo version tags (e.g.
v1.108.1) with the docker image tags shown here.Could you please provide some guidance and documentation about how to run the docker image as a git hook on a local repo? Thank you!