Public repository for ragedunicorn docker terraform images
1.3K

A lightweight Terraform CLI build on Alpine Linux. The official Terraform release
is GPG- and checksum-verified at build time, then shipped as a non-root,
single-purpose image with terraform as its entrypoint.
# Pull latest version
docker pull ragedunicorn/terraform:latest
# Or pull a specific version
docker pull ragedunicorn/terraform:1.9.8-alpine3.22.1-1
# Show the version
docker run --rm ragedunicorn/terraform:latest version
# Run against a configuration in the current directory
docker run --rm -v "$(pwd)":/workspace ragedunicorn/terraform:latest init
On Windows, use the PowerShell form - ${PWD} with braces and the colon
inside the quotes (without braces PowerShell parses $PWD: as a
scope-qualified variable, as in $env:PATH, and rejects the argument):
# Run against a configuration in the current directory
docker run --rm -v "${PWD}:/workspace" ragedunicorn/terraform:latest init
terraform is the entrypoint, nothing else bundledterraform userlinux/amd64 and linux/arm64docker run --rm -v "$(pwd)":/workspace ragedunicorn/terraform:latest init
docker run --rm -v "$(pwd)":/workspace ragedunicorn/terraform:latest plan
docker run --rm -v "$(pwd)":/workspace ragedunicorn/terraform:latest apply
PowerShell:
docker run --rm -v "${PWD}:/workspace" ragedunicorn/terraform:latest init
docker run --rm -v "${PWD}:/workspace" ragedunicorn/terraform:latest plan
docker run --rm -v "${PWD}:/workspace" ragedunicorn/terraform:latest apply
docker run --rm --user "$(id -u):$(id -g)" \
-v "$(pwd)":/workspace ragedunicorn/terraform:latest init
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).
docker run --rm \
-v "$(pwd)":/workspace \
-v terraform-plugin-cache:/home/terraform/.terraform.d/plugin-cache \
-e TF_PLUGIN_CACHE_DIR=/home/terraform/.terraform.d/plugin-cache \
ragedunicorn/terraform:latest init
PowerShell:
docker run --rm `
-v "${PWD}:/workspace" `
-v terraform-plugin-cache:/home/terraform/.terraform.d/plugin-cache `
-e TF_PLUGIN_CACHE_DIR=/home/terraform/.terraform.d/plugin-cache `
ragedunicorn/terraform:latest init
docker run --rm \
-e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_REGION \
-v "$(pwd)":/workspace ragedunicorn/terraform:latest apply
PowerShell:
docker run --rm `
-e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_REGION `
-v "${PWD}:/workspace" ragedunicorn/terraform:latest apply
terraform.tfstate,
.terraform.lock.hcl and .terraform/. Do not mount /workspace read-only.terraform user;
match your host user with --user "$(id -u):$(id -g)" so files stay yours.init â plan â apply).This image uses versioning that includes all component versions:
Format: {terraform_version}-alpine{alpine_version}-{build_number}
1.9.8-alpine3.22.1-1 - Initial release with Terraform 1.9.8 and Alpine 3.22.11.9.8-alpine3.22.1-2 - Rebuild of the same versions (base CVE patch, fixes)1.9.8-alpine3.22.2-1 - Alpine Linux patch update1.10.0-alpine3.22.1-1 - Terraform version update (build resets to 1)This image's build tooling is MIT-licensed. The bundled Terraform binary is distributed by HashiCorp under the Business Source License 1.1 (BSL-1.1) - source-available, not OSI open source. See the HashiCorp LICENSEâ . For a fully open source alternative, see OpenTofuâ (MPL-2.0).
Content type
Image
Digest
sha256:2bb8c55e8âĶ
Size
46.8 MB
Last updated
about 1 month ago
docker pull ragedunicorn/terraform