Sign inSign up

kamorion/opentofu-pre-commit

By kamorion

•Updated 5 months ago

Docker images with OpenTofu and infrastructure tools for CI/CD and pre-commit hooks.

Image
0

10K+

kamorion/opentofu-pre-commit repository overview

⁠OpenTofu Pre-commit Tools

Docker images with OpenTofu and infrastructure tools for CI/CD pipelines, pre-commit hooks, and dev environments.

⁠Quick Start

docker pull kamorion/opentofu-pre-commit:latest

docker run --rm -v $(pwd):/workspace \
  kamorion/opentofu-pre-commit:latest tofu init

docker run --rm -v $(pwd):/workspace \
  kamorion/opentofu-pre-commit:latest \
  pre-commit run --all-files

Also on GHCR: ghcr.io/kamorionlabs/opentofu-pre-commit:latest

⁠Image Variants

TagBaseCloud CLIsArch
latestUbuntu 24.04AWS v2amd64/arm64
alpineAlpine 3.21AWS v1amd64/arm64
slimDebian SlimAWS v2amd64/arm64
azurelinuxAzure Linux 3.0AWS v2 + Azureamd64

⁠Included Tools

IaC: OpenTofu, TFLint, Terraform-docs, Checkov, Trivy

Quality: Pre-commit (pre-cached), Yamllint, Markdownlint-cli2, Shellcheck, Shfmt, Typos

Security: Gitleaks, Trivy, Checkov

System: Git, Curl, JQ, Python3, Node.js

⁠CI/CD Integration

⁠GitHub Actions
jobs:
  validate:
    runs-on: ubuntu-latest
    container:
      image: kamorion/opentofu-pre-commit:alpine
    steps:
      - uses: actions/checkout@v4
      - run: tofu init && tofu validate
      - run: checkov -d .
⁠Azure DevOps
container: kamorion/opentofu-pre-commit:azurelinux

steps:
- script: tofu init && tofu validate
  displayName: 'Validate'
⁠GitLab CI
image: kamorion/opentofu-pre-commit:alpine

validate:
  script:
    - tofu init && tofu validate
    - checkov -d .

⁠Building Locally

docker build -f Dockerfile \
  -t opentofu-pre-commit:ubuntu .
docker build -f Dockerfile.alpine \
  -t opentofu-pre-commit:alpine .
docker build -f Dockerfile.slim \
  -t opentofu-pre-commit:slim .
docker build -f Dockerfile.azurelinux \
  -t opentofu-pre-commit:azurelinux .

docker run --rm opentofu-pre-commit:ubuntu verify

⁠Dependency Management

Dependencies are automatically updated via Renovate⁠: Docker base images, tool versions, pip/npm packages, pre-commit hooks, and GitHub Actions.

⁠License

MIT⁠

Tag summary

Content type

Image

Digest

sha256:f013af79d…

Size

684.2 MB

Last updated

5 months ago

docker pull kamorion/opentofu-pre-commit