Skip to content

Commit

Permalink
docs: add docker example with --init (#2242)
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Drucker <[email protected]>
  • Loading branch information
coolapso and bendrucker authored Feb 19, 2025
1 parent 6c8067c commit a0b4703
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ Instead of installing directly, you can use the Docker image:
docker run --rm -v $(pwd):/data -t ghcr.io/terraform-linters/tflint
```

To download plugins, you can override the entrypoint to a shell (`sh`) to run `--init` and the main command in a single `docker run` command:

```console
docker run --rm -v $(pwd):/data -t --entrypoint /bin/sh ghcr.io/terraform-linters/tflint -c "tflint --init && tflint"
```

### GitHub Actions

If you want to run on GitHub Actions, [setup-tflint](https://github.com/terraform-linters/setup-tflint) action is available.
Expand Down

0 comments on commit a0b4703

Please sign in to comment.