Public repository for ragedunicorn docker terraform-docs images
1.1K

A lightweight terraform-docsâ
CLI built on Alpine Linux. The official terraform-docs release is
checksum-verified at build time, then shipped as a non-root, single-purpose image
with terraform-docs as its entrypoint.
# Pull latest version
docker pull ragedunicorn/terraform-docs:latest
# Or pull a specific version (see the Tags tab for the available versions)
docker pull ragedunicorn/terraform-docs:<terraform-docs-version>-alpine<alpine-version>-<build>
# Show the version
docker run --rm ragedunicorn/terraform-docs:latest --version
# Generate markdown docs for the module in the current directory
docker run --rm -v "$(pwd)":/workspace ragedunicorn/terraform-docs:latest markdown .
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):
# Generate markdown docs for the module in the current directory
docker run --rm -v "${PWD}:/workspace" ragedunicorn/terraform-docs:latest markdown .
terraform-docs is the entrypoint, nothing else bundledterraform-docs userlinux/amd64 and linux/arm64docker run --rm -v "$(pwd)":/workspace ragedunicorn/terraform-docs:latest markdown table .
PowerShell:
docker run --rm -v "${PWD}:/workspace" ragedunicorn/terraform-docs:latest markdown table .
docker run --rm -v "$(pwd)":/workspace \
ragedunicorn/terraform-docs:latest markdown table --output-file README.md .
PowerShell:
docker run --rm -v "${PWD}:/workspace" `
ragedunicorn/terraform-docs:latest markdown table --output-file README.md .
docker run --rm -v "$(pwd)":/workspace ragedunicorn/terraform-docs:latest json .
PowerShell:
docker run --rm -v "${PWD}:/workspace" ragedunicorn/terraform-docs:latest json .
docker run --rm --user "$(id -u):$(id -g)" \
-v "$(pwd)":/workspace ragedunicorn/terraform-docs:latest markdown table --output-file README.md .
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).
--output-file. Printing to stdout works read-only,
but injecting docs into a file needs write access. The default mount is writable.--output-file replaces the content between
<!-- BEGIN_TF_DOCS --> and <!-- END_TF_DOCS --> in the target file.terraform-docs
user; match your host user with --user "$(id -u):$(id -g)" so files stay yours..terraform-docs.yml in the module directory is picked up
automatically to control format, sections and sort order.This image uses versioning that includes all component versions:
Format: {terraform_docs_version}-alpine{alpine_version}-{build_number}
X.Y.Z is the terraform-docs version, A.B.C the Alpine version:
X.Y.Z-alpineA.B.C-1 - terraform-docs X.Y.Z on Alpine A.B.C, build 1X.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 - terraform-docs version update (build resets to 1)X.Y.Z - Most recent build of terraform-docs 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 terraform-docs binary is distributed by the terraform-docs project under the MIT License as well. See the terraform-docs LICENSEâ .
Content type
Image
Digest
sha256:47bc2e3ccâĶ
Size
10.5 MB
Last updated
19 days ago
docker pull ragedunicorn/terraform-docs