Public repository for ragedunicorn docker tflint images
1.1K

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.
# 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
tflint is the entrypoint, nothing else bundledtflint userlinux/amd64 and linux/arm64tflint --init plugin downloads over HTTPSdocker run --rm -v "$(pwd)":/workspace:ro ragedunicorn/tflint:latest --chdir=/workspace
PowerShell:
docker run --rm -v "${PWD}:/workspace:ro" ragedunicorn/tflint:latest --chdir=/workspace
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
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
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).
/workspace read-only if you like.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.tflint user;
match your host user with --user "$(id -u):$(id -g)" so files stay yours.0 = no issues, 2 = issues found, 1 = an application error.This image uses versioning that includes all component versions:
Format: {tflint_version}-alpine{alpine_version}-{build_number}
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 buildX.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 updateX.Y+1.0-alpineA.B.C-1 - TFLint version update (build resets to 1)X.Y.Z - Most recent build of TFLint X.Y.Zlatest - Most recent stable releaseThe available versions are listed in the Tags tabâ .
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â .
Content type
Image
Digest
sha256:7110df2c6âĶ
Size
20.7 MB
Last updated
18 days ago
docker pull ragedunicorn/tflint