Sign inSign up
tflint logo

ragedunicorn/tflint

By ragedunicorn

â€ĒUpdated 18 days ago

Public repository for ragedunicorn docker tflint images

Image
Languages & frameworks
Integration & delivery
Developer tools
0

1.1K

ragedunicorn/tflint repository overview

⁠TFLint Alpine Docker Image

Docker TFLint

A lightweight TFLint⁠ CLI built on Alpine Linux. The official TFLint release is cosign- and checksum-verified at build time, then shipped as a non-root, single-purpose image with tflint as its entrypoint.

⁠Quick Start

# Pull latest version
docker pull ragedunicorn/tflint:latest

# Or pull a specific version (see the Tags tab for the available versions)
docker pull ragedunicorn/tflint:<tflint-version>-alpine<alpine-version>-<build>

# Show the version
docker run --rm ragedunicorn/tflint:latest --version

# Lint Terraform code in the current directory
docker run --rm -v "$(pwd)":/workspace:ro ragedunicorn/tflint:latest --chdir=/workspace

On Windows, use the PowerShell form - ${PWD} with braces and the colon (and the :ro suffix) inside the quotes (without braces PowerShell parses $PWD: as a scope-qualified variable, as in $env:PATH, and rejects the argument):

# Lint Terraform code in the current directory
docker run --rm -v "${PWD}:/workspace:ro" ragedunicorn/tflint:latest --chdir=/workspace

⁠Features

  • ðŸŠķ Small footprint: minimal Alpine-based runtime image
  • 🔐 Verified download: cosign keyless signature and SHA256 checksum verified at build time
  • ðŸŽŊ Single purpose: tflint is the entrypoint, nothing else bundled
  • 🔒 Runs as non-root: executes as the unprivileged tflint user
  • 🏗ïļ Multi-platform: supports linux/amd64 and linux/arm64
  • ðŸ§Đ ca-certificates: ready for tflint --init plugin downloads over HTTPS

⁠Usage Examples

⁠Lint the working directory
docker run --rm -v "$(pwd)":/workspace:ro ragedunicorn/tflint:latest --chdir=/workspace

PowerShell:

docker run --rm -v "${PWD}:/workspace:ro" ragedunicorn/tflint:latest --chdir=/workspace
⁠Install external rulesets (AWS, Google, Azure, â€Ķ)
docker run --rm \
  -v "$(pwd)":/workspace \
  -v tflint-plugin-cache:/home/tflint/.tflint.d/plugins \
  ragedunicorn/tflint:latest --chdir=/workspace --init

PowerShell:

docker run --rm `
  -v "${PWD}:/workspace" `
  -v tflint-plugin-cache:/home/tflint/.tflint.d/plugins `
  ragedunicorn/tflint:latest --chdir=/workspace --init
⁠Output findings as JSON
docker run --rm -v "$(pwd)":/workspace:ro \
  ragedunicorn/tflint:latest --chdir=/workspace --format=json

PowerShell:

docker run --rm -v "${PWD}:/workspace:ro" `
  ragedunicorn/tflint:latest --chdir=/workspace --format=json
⁠Match host user for bind-mount ownership
docker run --rm --user "$(id -u):$(id -g)" \
  -v "$(pwd)":/workspace:ro ragedunicorn/tflint:latest --chdir=/workspace

On Windows hosts this is not needed: Docker Desktop bind mounts do not carry Unix file ownership, so --user matching has no effect (and id does not exist in PowerShell).

⁠Runtime Notes

  • Read-only workspace is fine. TFLint only reads your config; mount /workspace read-only if you like.
  • External rulesets need tflint --init. That requires network access and a writable plugin directory (~/.tflint.d/plugins, overridable with TFLINT_PLUGIN_DIR). The bundled terraform ruleset works offline.
  • Bind-mount ownership. The container runs as the non-root tflint user; match your host user with --user "$(id -u):$(id -g)" so files stay yours.
  • Exit codes: 0 = no issues, 2 = issues found, 1 = an application error.

⁠Tags

This image uses versioning that includes all component versions:

Format: {tflint_version}-alpine{alpine_version}-{build_number}

⁠Version Examples

X.Y.Z is the TFLint version, A.B.C the Alpine version:

  • X.Y.Z-alpineA.B.C-1 - TFLint X.Y.Z on Alpine A.B.C, first build
  • X.Y.Z-alpineA.B.C-2 - Rebuild of the same versions (base CVE patch, fixes)
  • X.Y.Z-alpineA.B.D-1 - Alpine Linux patch update
  • X.Y+1.0-alpineA.B.C-1 - TFLint version update (build resets to 1)
  • X.Y.Z - Most recent build of TFLint X.Y.Z
  • latest - Most recent stable release

The available versions are listed in the Tags tab⁠.

⁠License

This image's build tooling is MIT-licensed. The bundled TFLint binary is distributed by the terraform-linters project under the Mozilla Public License 2.0 (MPL-2.0), an OSI-approved open source license. See the TFLint LICENSE⁠.

Tag summary

Content type

Image

Digest

sha256:7110df2c6â€Ķ

Size

20.7 MB

Last updated

18 days ago

docker pull ragedunicorn/tflint