专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像 官方专业版轩辕镜像 官方专业版官方专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 1072982923

oorabona/terraform Docker 镜像 - 轩辕镜像 | Docker 镜像高效稳定拉取服务

热门搜索:openclaw🔥nginx🔥redis🔥mysqlopenjdkcursorweb2apimemgraphzabbixetcdubuntucorednsjdk
terraform
oorabona/terraform
oorabona
terraform container
下载次数: 0状态:社区镜像维护者:oorabona仓库类型:镜像最近更新:1 天前
轩辕镜像,让镜像更快,让人生更轻。点击查看
镜像简介版本下载
轩辕镜像,让镜像更快,让人生更轻。点击查看

Terraform

Enterprise-grade Terraform container with comprehensive DevOps tooling for multi-cloud infrastructure as code. Available in multiple flavors optimized for AWS, Azure, GCP, or all clouds.

![Docker Hub]([] ![GHCR]([] ![Build]([***]

Quick Start

bash
# Full flavor with all cloud CLIs (recommended for development)
docker pull ghcr.io/oorabona/terraform:latest

# Base flavor (smallest image, no cloud CLIs)
docker pull ghcr.io/oorabona/terraform:latest-base

# AWS-specific flavor
docker pull ghcr.io/oorabona/terraform:latest-aws

# Azure-specific flavor
docker pull ghcr.io/oorabona/terraform:latest-azure

# GCP-specific flavor
docker pull ghcr.io/oorabona/terraform:latest-gcp

Available Flavors

All flavors include the core security and DevOps toolkit. The difference is which cloud CLIs are included:

FlavorDescriptionCloud CLIsUse Case
baseCore tools onlyNoneSmallest image, cloud-agnostic
awsAWS optimizedAWS CLIAWS-only infrastructure
azureAzure optimizedAzure CLIAzure-only infrastructure
gcpGCP optimizedGoogle Cloud SDKGCP-only infrastructure
fullAll cloudsAWS CLI + Azure CLI + Google Cloud SDK + j2cliMulti-cloud or development
Flavor Details
Base (*-base)

Includes Terraform, security scanning, linting, and documentation tools. No cloud provider CLIs installed. Smallest image size.

Tools:

  • Terraform
  • TFLint (linting)
  • Trivy (security scanning)
  • Terragrunt (orchestration)
  • terraform-docs (documentation generation)
  • Infracost (cost estimation)
  • GitHub CLI
  • Git, Jq, Yq
AWS (*-aws)

Includes base + AWS CLI for Amazon Web Services infrastructure.

Additional tools:

  • AWS CLI (pinned version for reproducibility)
Azure (*-azure)

Includes base + Azure CLI for Microsoft Azure infrastructure.

Additional tools:

  • Azure CLI (pinned version for reproducibility)
GCP (*-gcp)

Includes base + Google Cloud SDK for Google Cloud Platform infrastructure.

Additional tools:

  • Google Cloud SDK (always latest - GCP installer doesn't support version pinning)
  • gcloud, gsutil, bq commands
Full (*-full)

Includes all cloud CLIs plus Jinja2 templating engine. Recommended for:

  • Multi-cloud environments
  • Development and testing
  • CI/CD pipelines
  • Template-based infrastructure

Additional tools:

  • AWS CLI
  • Azure CLI
  • Google Cloud SDK
  • j2cli (Jinja2 templating)
Image Tags
ghcr.io/oorabona/terraform:{version}-{flavor}

Examples:

  • latest or latest-full - Latest Terraform, all clouds
  • latest-base - Latest Terraform, no cloud CLIs
  • latest-aws - Latest Terraform with AWS CLI
  • 1.10.3-azure - Terraform 1.10.3 with Azure CLI

Tools Reference

All versions are pinned and automatically monitored for updates:

ToolVersionDescriptionFlavors
Terraform(upstream)Infrastructure as codeAll
TFLint0.60.0Terraform linterAll
Trivy0.69.1Security scannerAll
Terragrunt0.99.1Terraform orchestrationAll
terraform-docs0.21.0Documentation generatorAll
Infracost0.10.43Cloud cost estimationAll
GitHub CLI2.86.0GitHub automationAll
AWS CLI1.44.33Amazon Web Services CLIaws, full
Azure CLI2.83.0Microsoft Azure CLIazure, full
Google Cloud SDKlatestGoogle Cloud Platform CLIgcp, full
j2cli(latest)Jinja2 templating CLIfull
Built-in Utilities

All flavors include:

  • Git - Version control
  • Jq - JSON processor
  • Yq - YAML processor
  • Bash - Shell scripting
  • Curl - HTTP client
  • Python 3 - Scripting runtime

Usage

Docker Compose (Recommended)
yaml
services:
  terraform:
    image: ghcr.io/oorabona/terraform:latest
    user: "1000:1000"
    volumes:
      - .:/data
      - ~/.aws:/home/terraform/.aws:ro  # AWS credentials (read-only)
      - ~/.azure:/home/terraform/.azure:ro  # Azure credentials (read-only)
      - ~/.config/gcloud:/home/terraform/.config/gcloud:ro  # GCP credentials (read-only)
    environment:
      # Pass credentials from environment, never hardcode
      - AWS_ACCESS_KEY_ID
      - AWS_SECRET_ACCESS_KEY
      - AWS_DEFAULT_REGION
      - AZURE_SUBSCRIPTION_ID
      - AZURE_TENANT_ID
      - AZURE_CLIENT_ID
      - AZURE_CLIENT_SECRET
      - GOOGLE_APPLICATION_CREDENTIALS
      - TF_VAR_project_id
Docker Run
bash
# Initialize and plan
docker run --rm \
  -v $(pwd):/data \
  -v ~/.aws:/home/terraform/.aws:ro \
  ghcr.io/oorabona/terraform:latest-aws \
  init

docker run --rm \
  -v $(pwd):/data \
  -v ~/.aws:/home/terraform/.aws:ro \
  -e AWS_DEFAULT_REGION \
  ghcr.io/oorabona/terraform:latest-aws \
  plan

# Apply with environment credentials
docker run --rm -it \
  -v $(pwd):/data \
  -e AWS_ACCESS_KEY_ID \
  -e AWS_SECRET_ACCESS_KEY \
  -e AWS_DEFAULT_REGION \
  ghcr.io/oorabona/terraform:latest-aws \
  apply
Jinja2 Templating (full flavor only)

The full flavor includes j2cli for template-based infrastructure:

bash
# Create templated Terraform files with .j2 extension
# Example: main.tf.j2
resource "aws_instance" "{{ instance_name }}" {
  instance_type = "{{ instance_type }}"
  ami           = "{{ ami_id }}"
}

# Create config.json with template variables
{
  "instance_name": "web-server",
  "instance_type": "t3.micro",
  "ami_id": "ami-***"
}

# Process templates
docker run --rm \
  -v $(pwd):/data \
  ghcr.io/oorabona/terraform:latest \
  bash -c "for f in *.tf.j2; do j2 \$f config.json > \${f%.j2}; done && terraform plan"
Security Scanning
bash
# Scan Terraform configurations for misconfigurations
docker run --rm -v $(pwd):/data ghcr.io/oorabona/terraform:latest \
  trivy config .

# Scan with detailed output
docker run --rm -v $(pwd):/data ghcr.io/oorabona/terraform:latest \
  trivy config --format table --severity HIGH,CRITICAL .

# Scan for sensitive data
docker run --rm -v $(pwd):/data ghcr.io/oorabona/terraform:latest \
  trivy fs --scanners secret .
Linting
bash
# Initialize TFLint plugins
docker run --rm -v $(pwd):/data ghcr.io/oorabona/terraform:latest \
  tflint --init

# Lint Terraform files
docker run --rm -v $(pwd):/data ghcr.io/oorabona/terraform:latest \
  tflint

# Lint with AWS plugin
docker run --rm -v $(pwd):/data ghcr.io/oorabona/terraform:latest-aws \
  tflint --config=.tflint.hcl
Documentation Generation
bash
# Generate README.md from Terraform modules
docker run --rm -v $(pwd):/data ghcr.io/oorabona/terraform:latest \
  terraform-docs markdown table . > README.md

# Generate JSON output
docker run --rm -v $(pwd):/data ghcr.io/oorabona/terraform:latest \
  terraform-docs json . > module.json
Cost Estimation
bash
# Generate cost breakdown
docker run --rm -v $(pwd):/data ghcr.io/oorabona/terraform:latest \
  infracost breakdown --path .

# Compare costs between branches
docker run --rm -v $(pwd):/data ghcr.io/oorabona/terraform:latest \
  infracost diff --path .
Building Locally
bash
# Build specific flavor
docker build --build-arg VERSION=latest --build-arg FLAVOR=aws -t terraform:aws .

# Build full flavor (default)
docker build --build-arg VERSION=latest -t terraform:full .

# Build base flavor
docker build --build-arg VERSION=latest --build-arg FLAVOR=base -t terraform:base .

Build Arguments

ArgumentDescriptionDefault
VERSIONTerraform versionlatest
UPSTREAM_VERSIONRaw Terraform version (without suffix)(derived from VERSION)
FLAVORFlavor to buildfull
TFLINT_VERSIONTFLint version0.60.0
TRIVY_VERSIONTrivy version0.69.1
TERRAGRUNT_VERSIONTerragrunt version0.99.1
TERRAFORM_DOCS_VERSIONterraform-docs version0.21.0
INFRACOST_VERSIONInfracost version0.10.43
GITHUB_CLI_VERSIONGitHub CLI version2.86.0
AWS_CLI_VERSIONAWS CLI version1.44.33
AZURE_CLI_VERSIONAzure CLI version2.83.0
GCP_CLI_VERSIONGCP SDK versionlatest

Environment Variables

VariableDescriptionDefault
CONFIGFILEJinja2 configuration file (full flavor)config.json
TERRAFORM_FLAVORFlavor identifier(set during build)
AWS_ACCESS_KEY_IDAWS credentials(pass from environment)
AWS_SECRET_ACCESS_KEYAWS credentials(pass from environment)
AWS_DEFAULT_REGIONAWS region(pass from environment)
AZURE_SUBSCRIPTION_IDAzure subscription(pass from environment)
AZURE_TENANT_IDAzure tenant(pass from environment)
AZURE_CLIENT_IDAzure service principal(pass from environment)
AZURE_CLIENT_SECRETAzure service principal(pass from environment)
GOOGLE_APPLICATION_CREDENTIALSGCP credentials file path(pass from environment)
TF_VAR_*Terraform variables(user-defined)

Volumes

PathPurposeNotes
/dataTerraform working directoryWORKDIR + VOLUME
/home/terraform/.awsAWS credentialsMount read-only
/home/terraform/.azureAzure credentialsMount read-only
/home/terraform/.config/gcloudGCP credentialsMount read-only
/.terraform.dTerraform plugins/cacheUse tmpfs for security
/.configTool configurationUse tmpfs for security
/tmpTemporary filesUse tmpfs for security

Security

Base Security
  • Multi-stage build minimizes *** surface
  • Alpine-based final image for minimal footprint
  • Regular security updates through automated rebuilds
  • Includes Trivy for security scanning
  • Non-root execution by default
  • No shell access for terraform user (/sbin/nologin)
Credential Security (CRITICAL)

NEVER hardcode credentials in docker-compose.yml or Dockerfiles:

yaml
# BAD - Never do this:
environment:
  AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE

# GOOD - Use environment variables:
environment:
  AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
  AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}

# BETTER - Use credential files mounted read-only:
volumes:
  - ~/.aws:/home/terraform/.aws:ro
Runtime Hardening (Recommended)
yaml
services:
  terraform:
    image: ghcr.io/oorabona/terraform:latest
    user: "1000:1000"  # terraform:terraform
    read_only: true
    tmpfs:
      - /.terraform.d
      - /.config
      - /tmp
    cap_drop:
      - ALL
    security_opt:
      - no-new-privileges:true
    volumes:
      - .:/data:ro  # Read-only if only planning
      - ~/.aws:/home/terraform/.aws:ro
    environment:
      # Pass credentials from environment, never hardcode
      - AWS_ACCESS_KEY_ID
      - AWS_SECRET_ACCESS_KEY
      - AWS_DEFAULT_REGION
Scanning Your Infrastructure
bash
# Scan for security issues before applying
docker run --rm -v $(pwd):/data ghcr.io/oorabona/terraform:latest \
  trivy config --severity HIGH,CRITICAL .

# Scan for common Terraform mistakes
docker run --rm -v $(pwd):/data ghcr.io/oorabona/terraform:latest \
  tflint --enable-rule=terraform_deprecated_interpolation

# Check for secrets in code
docker run --rm -v $(pwd):/data ghcr.io/oorabona/terraform:latest \
  trivy fs --scanners secret .

Dependencies

All tool versions are pinned and automatically monitored for updates:

DependencyVersionSourceMonitoringLicense
Terraformupstreamhashicorp/terraformDocker HubMPL-2.0
TFLint0.60.0terraform-linters/tflintGitHub ReleasesMPL-2.0
Trivy0.69.1aquasecurity/trivyGitHub ReleasesApache-2.0
Terragrunt0.99.1gruntwork-io/terragruntGitHub ReleasesMIT
terraform-docs0.21.0terraform-docs/terraform-docsGitHub ReleasesMIT
Infracost0.10.43infracost/infracostGitHub ReleasesApache-2.0
GitHub CLI2.86.0cli/cliGitHub ReleasesMIT
AWS CLI1.44.33awscliPyPIApache-2.0
Azure CLI2.83.0azure-cliPyPIMIT
Google Cloud SDKlatestN/ANot tracked*Apache-2.0

*Google Cloud SDK installer always fetches the latest version - version pinning is not supported by the GCP installer. The GCP_CLI_VERSION in config.yaml is for reference only.

Architecture

terraform/
├── Dockerfile                 # Multi-stage, multi-flavor build
├── docker-entrypoint.sh       # Entrypoint script
├── docker-compose.yml         # Example composition
├── config.yaml               # Tool version configuration
├── version.sh                # Upstream version discovery
└── build                     # Build script with auto-version detection
Multi-stage Build

The Dockerfile uses a multi-stage build process:

  1. terraform stage - Extracts Terraform binary from HashiCorp image
  2. security-tools stage - Downloads TFLint and Trivy
  3. devops-tools stage - Downloads Terragrunt, terraform-docs, Infracost, GitHub CLI
  4. cloud-tools-gcp stage - Conditionally installs Google Cloud SDK (only for gcp/full flavors)
  5. Final stage - Assembles tools based on FLAVOR argument and installs cloud CLIs via pip

This approach:

  • Minimizes final image size
  • Enables parallel builds of independent stages
  • Allows conditional inclusion of cloud-specific tools
  • Maintains clean separation of concerns
Flavor Selection

Build-time FLAVOR argument determines:

  • Which cloud CLIs are installed via pip (AWS, Azure)
  • Whether Google Cloud SDK is copied from cloud-tools-gcp stage
  • Whether j2cli is installed (full flavor only)
  • Contents of environment variable TERRAFORM_FLAVOR

CI/CD Integration

GitHub Actions
yaml
- name: Terraform Plan
  uses: docker://ghcr.io/oorabona/terraform:latest-aws
  with:
    args: plan -out=tfplan
  env:
    AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
    AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    AWS_DEFAULT_REGION: us-east-1

- name: Security Scan
  uses: docker://ghcr.io/oorabona/terraform:latest
  with:
    args: trivy config --exit-code 1 --severity HIGH,CRITICAL .

- name: Cost Estimation
  uses: docker://ghcr.io/oorabona/terraform:latest
  with:
    args: infracost breakdown --path .
  env:
    INFRACOST_API_KEY: ${{ secrets.INFRACOST_API_KEY }}
GitLab CI
yaml
terraform:
  image: ghcr.io/oorabona/terraform:latest-aws
  script:
    - terraform init
    - terraform plan
    - trivy config .
  variables:
    AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
    AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY

Troubleshooting

Permission Denied
bash
# Ensure proper user ownership
docker run --rm -it --user 1000:1000 \
  -v $(pwd):/data \
  ghcr.io/oorabona/terraform:latest init

# Or fix permissions on host
sudo chown -R 1000:1000 .terraform/
Plugin Installation Issues
bash
# Clear plugin cache
rm -rf .terraform/
docker run --rm -v $(pwd):/data \
  ghcr.io/oorabona/terraform:latest init -upgrade
Cloud Provider Authentication
bash
# AWS - Verify credentials
docker run --rm \
  -e AWS_ACCESS_KEY_ID \
  -e AWS_SECRET_ACCESS_KEY \
  ghcr.io/oorabona/terraform:latest-aws \
  aws sts get-caller-identity

# Azure - Verify login
docker run --rm \
  -v ~/.azure:/home/terraform/.azure:ro \
  ghcr.io/oorabona/terraform:latest-azure \
  az account show

# GCP - Verify authentication
docker run --rm \
  -v ~/.config/gcloud:/home/terraform/.config/gcloud:ro \
  ghcr.io/oorabona/terraform:latest-gcp \
  gcloud auth list

Links

  • Terraform Documentation
  • TFLint Rules
  • Trivy Documentation
  • Terragrunt Documentation
  • terraform-docs Documentation
  • Infracost Documentation
  • GitHub CLI Manual
  • AWS CLI Documentation
  • Azure CLI Documentation
  • Google Cloud SDK Documentation
  • Docker Hub Repository
  • GitHub Container Registry
  • Source Repository
查看更多 terraform 相关镜像 →
hashicorp/terraform logo
hashicorp/terraform
hashicorp
Terraform的自动构建。有关更多使用方法和信息,请参见README。
505 次收藏1亿+ 次下载
1 个月前更新
akamai/terraform logo
akamai/terraform
akamai
Akamai Terraform provider是Akamai官方提供的Terraform提供程序,用于通过Terraform管理Akamai服务(如CDN、DNS、WAF)的资源,实现基础设施即代码的自动化部署与配置管理。
1万+ 次下载
1 个月前更新
scalr/terraform logo
scalr/terraform
scalr
暂无描述
1亿+ 次下载
1 个月前更新
wpengine/terraform logo
wpengine/terraform
wpengine
包含gcloud和terraform工具的Docker镜像,提供便捷的云资源管理与基础设施即代码(IaC)部署环境。
1 次收藏10万+ 次下载
5 个月前更新
vydev/terraform logo
vydev/terraform
vydev
集成Terraform与AWS CLI的可重用Docker镜像,适用于自动化流水线的构建、测试及部署阶段。
50万+ 次下载
2 个月前更新
ovotech/terraform logo
ovotech/terraform
ovotech
暂无描述
100万+ 次下载
1 年前更新

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

Docker 配置

登录仓库拉取

通过 Docker 登录认证访问私有仓库

专属域名拉取

无需登录使用专属域名

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

系统配置

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

MacOS OrbStack

MacOS OrbStack 容器配置

Docker Compose

Docker Compose 项目配置

NAS 设备

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

极空间

极空间 NAS 系统配置服务

网络设备

爱快路由

爱快 iKuai 路由系统配置

宝塔面板

在宝塔面板一键配置镜像

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

使用与功能问题

docker search 报错:专属域名下仅支持 Docker Hub 查询

docker search 报错问题

网页搜不到镜像:Docker Hub 有但轩辕镜像搜索无结果

镜像搜索不到

离线传输镜像:无法直连时用 docker save/load 迁移

离线传输镜像

Docker 插件安装错误:application/vnd.docker.plugin.v1+json

Docker 插件安装错误

WSL 下 Docker 拉取慢:网络与挂载目录影响及优化

WSL 拉取镜像慢

轩辕镜像是否安全?镜像完整性校验(digest)说明

镜像安全性

如何用轩辕镜像拉取镜像?登录方式与专属域名配置

如何拉取镜像

错误码与失败问题

manifest unknown 错误:镜像不存在或标签错误

manifest unknown 错误

TLS/SSL 证书验证失败:Docker pull 时 HTTPS 证书错误

TLS 证书验证失败

DNS 解析超时:无法解析镜像仓库地址或连接超时

DNS 解析超时

410 Gone 错误:Docker 版本过低导致协议不兼容

410 错误:版本过低

402 Payment Required 错误:流量耗尽错误提示

402 错误:流量耗尽

401 UNAUTHORIZED 错误:身份认证失败或登录信息错误

身份认证失败错误

429 Too Many Requests 错误:请求频率超出专业版限制

429 限流错误

Docker login 凭证保存错误:Cannot autolaunch D-Bus(不影响登录)

凭证保存错误

账号 / 计费 / 权限

免费版与专业版区别:功能、限额与使用场景对比

免费版与专业版区别

支持的镜像仓库:Docker Hub、GCR、GHCR、K8s 等列表

轩辕镜像支持的镜像仓库

拉取失败是否扣流量?计费规则说明

拉取失败流量计费

KYSEC 权限不够:麒麟 V10/统信 UOS 下脚本执行被拦截

KYSEC 权限错误

如何申请开具发票?(增值税普票/专票)

开具发票

如何修改网站与仓库登录密码?

修改网站和仓库密码

配置与原理类

registry-mirrors 未生效:仍访问官方仓库或报错的原因

registry-mirrors 未生效

如何去掉镜像名称中的轩辕域名前缀?(docker tag)

去掉域名前缀

如何拉取指定架构镜像?(ARM64/AMD64 等多架构)

拉取指定架构镜像

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
oorabona/terraform
博客公告Docker 镜像公告与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
镜像拉取问题咨询请 提交工单,官方技术交流群:1072982923。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
镜像拉取问题咨询请提交工单,官方技术交流群:。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
官方邮箱:点击复制邮箱
©2024-2026 源码跳动
官方邮箱:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.