Skip to content

Commit 9e0a309

Browse files
committed
chore: More coderabbit nitpicks
1 parent 3d20103 commit 9e0a309

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ Check the [source file](https://github.com/antonbabenko/pre-commit-terraform/blo
344344
### Docker-based hooks (no local tool installation required)
345345

346346
For users who prefer not to install tools locally, Docker-based versions are available for most hooks. These hooks use a Docker image with all tools pre-installed and provide the same functionality as their script-based counterparts.
347+
Note: These hooks are defined with pre-commit language: docker_image and reference the Docker image via the entry parameter in .pre-commit-hooks.yaml.
347348
These hooks run inside the tools image defined by the hook itself (no image configuration needed in your .pre-commit-config.yaml). The image is published at ghcr.io/antonbabenko/pre-commit-terraform-tools with a tag or digest pinned in .pre-commit-hooks.yaml.
348349

349350

@@ -372,7 +373,7 @@ These hooks run inside the tools image defined by the hook itself (no image conf
372373

373374
* Docker must be installed and accessible.
374375
* For pre-commit.ci: its agents do not have Docker; skip these hooks for now.
375-
* Note: pre-commit supports Docker hooks, so pre-commit.ci may add Docker support in the future.
376+
* Note: pre-commit supports Docker hooks; pre-commit.ci may add Docker support in the future.
376377
* You can still use Docker-based hooks in CI/CD (e.g., GitHub Actions, GitLab CI) by running `pre-commit run --all-files` (or `pre-commit run -a`) on runners where Docker is available. This enforces the same checks in CI as locally, even if pre-commit.ci doesn’t support Docker yet.
377378

378379
**Skipping Docker hooks on pre-commit.ci:**
@@ -1278,7 +1279,7 @@ The [recommended command](#4-run) to run the Docker container is:
12781279

12791280
```bash
12801281
TAG=latest
1281-
docker run -e "USERID=$(id -u):$(id -g)" -v "$(pwd):/lint" -w "/lint" ghcr.io/antonbabenko/pre-commit-terraform:$TAG run -a
1282+
docker run --rm -e "USERID=$(id -u):$(id -g)" -v "$(pwd):/lint" -w "/lint" "ghcr.io/antonbabenko/pre-commit-terraform:$TAG" run -a
12821283
```
12831284

12841285
which uses your current session's user ID and group ID to set the variable in the run command. Without this setting, you may find files and directories owned by `root` in your local repository.

0 commit comments

Comments
 (0)