You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -355,6 +355,10 @@ For users who prefer not to install tools locally, Docker-based versions are ava
355
355
|`terraform_trivy_docker`|`terraform_trivy`| Security analysis with Trivy using Docker |
356
356
|`infracost_breakdown_docker`|`infracost_breakdown`| Infrastructure cost analysis using Docker |
357
357
358
+
> **Note:**
359
+
> By default, `terraform_docs_docker` is configured with `pass_filenames: false` and an explicit `.` target. This documents only the root module, which is the most common use case. If you want to generate documentation for multiple modules in a monorepo, you can customize the `args` in your own `.pre-commit-config.yaml` (for example, add `--recursive` to the arguments).
360
+
361
+
358
362
**Benefits of Docker hooks:**
359
363
360
364
* No need to install individual tools on your local machine
@@ -364,10 +368,10 @@ For users who prefer not to install tools locally, Docker-based versions are ava
364
368
365
369
**Requirements and limitations:**
366
370
367
-
* Docker must be installed and accessible
368
-
* For pre-commit.ci users: At this time, skip these hooks because pre-commit.ci agents do not have Docker available.
369
-
*_Note: pre-commit has a Docker setup for hooks, so Docker support may be added in the future._
370
-
***You can still use Docker-based hooks in CI/CD pipelines** (such as GitHub Actions, GitLab CI, etc.) by running `pre-commit run --all-files` (or `pre-commit run -a`) on a self-hosted or GitHub-hosted runner where Docker is available. This allows you to enforce the same checks in CI as locally, even if pre-commit.ci does not support Docker yet.
371
+
* Docker must be installed and accessible.
372
+
* For pre-commit.ci: its agents do not have Docker; skip these hooks for now.
373
+
*Note: pre-commit supports Docker hooks, so pre-commit.ci may add Docker support in the future.
374
+
* 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.
371
375
372
376
**Skipping Docker hooks on pre-commit.ci:**
373
377
@@ -1272,7 +1276,7 @@ The [recommended command](#4-run) to run the Docker container is:
1272
1276
1273
1277
```bash
1274
1278
TAG=latest
1275
-
docker run -e "USERID=$(id -u):$(id -g)" -v "$(pwd):/lint" -w "/lint" ghcr.io/antonbabenko/pre-commit-terraform:latest run -a
1279
+
docker run -e "USERID=$(id -u):$(id -g)" -v "$(pwd):/lint" -w "/lint" ghcr.io/antonbabenko/pre-commit-terraform:$TAG run -a
1276
1280
```
1277
1281
1278
1282
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