Docker image for terragrunt

October 31, 2025 · View on GitHub

Tag License

lint build nightly

All #awesome-ci Docker images

ansible-lint ansible awesome-ci bandit black checkmake eslint file-lint gofmt goimports golint jsonlint kubeval linkcheck mypy php-cs-fixer phpcbf phpcs phplint pycodestyle pydocstyle pylint terraform-docs terragrunt-fmt terragrunt yamlfmt yamllint

View Dockerfiles on GitHub.

Available Architectures: amd64, i386, arm64

Tiny Alpine-based multistage-build dockerized version of Terragrunt[1] and its compatible version of Terraform[2].

:whale: Available Docker image versions

Docker

Rolling releaess

The following Docker image tags are rolling releases and are built and updated every night.

nightly

Docker TagGit RefTerraformTerragruntAvailable Architectures
latestmasterlatestlatestamd64, i386, arm64
1.13-0.86master1.13.x0.92.xamd64, i386, arm64
1.12-0.86master1.12.x0.92.xamd64, i386, arm64
1.11-0.86master1.11.x0.92.xamd64, i386, arm64
1.10-0.86master1.10.x0.92.xamd64, i386, arm64
1.9-0.86master1.9.x0.92.xamd64, i386, arm64
1.8-0.86master1.8.x0.92.xamd64, i386, arm64
1.13-0.86master1.13.x0.91.xamd64, i386, arm64
1.12-0.86master1.12.x0.91.xamd64, i386, arm64
1.11-0.86master1.11.x0.91.xamd64, i386, arm64
1.10-0.86master1.10.x0.91.xamd64, i386, arm64
1.9-0.86master1.9.x0.91.xamd64, i386, arm64
1.8-0.86master1.8.x0.91.xamd64, i386, arm64
1.13-0.86master1.13.x0.90.xamd64, i386, arm64
1.12-0.86master1.12.x0.90.xamd64, i386, arm64
1.11-0.86master1.11.x0.90.xamd64, i386, arm64
1.10-0.86master1.10.x0.90.xamd64, i386, arm64
1.9-0.86master1.9.x0.90.xamd64, i386, arm64
1.8-0.86master1.8.x0.90.xamd64, i386, arm64
1.13-0.86master1.13.x0.89.xamd64, i386, arm64
1.12-0.86master1.12.x0.89.xamd64, i386, arm64
1.11-0.86master1.11.x0.89.xamd64, i386, arm64
1.10-0.86master1.10.x0.89.xamd64, i386, arm64
1.9-0.86master1.9.x0.89.xamd64, i386, arm64
1.8-0.86master1.8.x0.89.xamd64, i386, arm64
1.13-0.86master1.13.x0.88.xamd64, i386, arm64
1.12-0.86master1.12.x0.88.xamd64, i386, arm64
1.11-0.86master1.11.x0.88.xamd64, i386, arm64
1.10-0.86master1.10.x0.88.xamd64, i386, arm64
1.9-0.86master1.9.x0.88.xamd64, i386, arm64
1.8-0.86master1.8.x0.88.xamd64, i386, arm64
1.13-0.86master1.13.x0.87.xamd64, i386, arm64
1.12-0.86master1.12.x0.87.xamd64, i386, arm64
1.11-0.86master1.11.x0.87.xamd64, i386, arm64
1.10-0.86master1.10.x0.87.xamd64, i386, arm64
1.9-0.86master1.9.x0.87.xamd64, i386, arm64
1.8-0.86master1.8.x0.87.xamd64, i386, arm64
1.13-0.86master1.13.x0.86.xamd64, i386, arm64
1.12-0.86master1.12.x0.86.xamd64, i386, arm64
1.11-0.86master1.11.x0.86.xamd64, i386, arm64
1.10-0.86master1.10.x0.86.xamd64, i386, arm64
1.9-0.86master1.9.x0.86.xamd64, i386, arm64
1.8-0.86master1.8.x0.86.xamd64, i386, arm64
1.12-0.82master1.12.x0.82.xamd64, i386, arm64
1.11-0.82master1.11.x0.82.xamd64, i386, arm64
1.10-0.82master1.10.x0.82.xamd64, i386, arm64
1.9-0.82master1.9.x0.82.xamd64, i386, arm64
1.8-0.82master1.8.x0.82.xamd64, i386, arm64
1.8-0.73master1.8.x0.73.xamd64, i386, arm64
1.7-0.73master1.7.x0.73.xamd64, i386, arm64
1.6-0.55master1.6.x0.55.xamd64, i386, arm64
1.6-0.54master1.6.x0.54.xamd64, i386, arm64
1.6-0.53master1.6.x0.53.xamd64, i386, arm64
1.5-0.53master1.5.x0.53.xamd64, i386, arm64
1.5-0.52master1.5.x0.52.xamd64, i386, arm64
1.5-0.51master1.5.x0.51.xamd64, i386, arm64
1.5-0.50master1.5.x0.50.xamd64, i386, arm64
1.5-0.49master1.5.x0.49.xamd64, i386, arm64
1.5-0.48master1.5.x0.48.xamd64, i386, arm64
1.5-0.47master1.5.x0.47.xamd64, i386, arm64
1.5-0.46master1.5.x0.46.xamd64, i386, arm64
1.4-0.50master1.4.x0.50.xamd64, i386, arm64
1.4-0.49master1.4.x0.49.xamd64, i386, arm64
1.4-0.48master1.4.x0.48.xamd64, i386, arm64
1.4-0.47master1.4.x0.47.xamd64, i386, arm64
1.4-0.46master1.4.x0.46.xamd64, i386, arm64
1.3-0.50master1.3.x0.50.xamd64, i386, arm64
1.3-0.49master1.3.x0.49.xamd64, i386, arm64
1.3-0.48master1.3.x0.48.xamd64, i386, arm64
1.3-0.47master1.3.x0.47.xamd64, i386, arm64
1.3-0.46master1.3.x0.46.xamd64, i386, arm64
1.2-0.41master1.2.x0.41.xamd64, i386, arm64
1.2-0.40master1.2.x0.40.xamd64, i386, arm64
1.2-0.39master1.2.x0.39.xamd64, i386, arm64
1.2-0.38master1.2.x0.38.xamd64, i386, arm64
1.2-0.37master1.2.x0.37.xamd64, i386, arm64
1.1-0.38master1.1.x0.38.xamd64, i386, arm64
1.1-0.38master1.1.x0.38.xamd64, i386, arm64
1.1-0.37master1.1.x0.37.xamd64, i386, arm64
1.1-0.36master1.1.x0.36.xamd64, i386, arm64
1.1-0.35master1.1.x0.35.xamd64, i386, arm64
1.0-0.38master1.0.x0.38.xamd64, i386, arm64
1.0-0.37master1.0.x0.37.xamd64, i386, arm64
1.0-0.36master1.0.x0.36.xamd64, i386, arm64
1.0-0.35master1.0.x0.35.xamd64, i386, arm64
1.0-0.34master1.0.x0.34.xamd64, i386, arm64
0.15-0.34master0.15.x0.34.xamd64, i386, arm64
0.15-0.33master0.15.x0.33.xamd64, i386, arm64
0.15-0.32master0.15.x0.32.xamd64, i386, arm64
0.15-0.31master0.15.x0.31.xamd64, i386, arm64
0.15-0.30master0.15.x0.30.xamd64, i386, arm64
0.14-0.34master0.14.x0.34.xamd64, i386, arm64
0.14-0.33master0.14.x0.33.xamd64, i386, arm64
0.14-0.32master0.14.x0.32.xamd64, i386, arm64
0.14-0.31master0.14.x0.31.xamd64, i386, arm64
0.14-0.30master0.14.x0.30.xamd64, i386, arm64
0.13-0.34master0.13.x0.34.xamd64, i386, arm64
0.13-0.33master0.13.x0.33.xamd64, i386, arm64
0.13-0.32master0.13.x0.32.xamd64, i386, arm64
0.13-0.31master0.13.x0.31.xamd64, i386, arm64
0.13-0.30master0.13.x0.30.xamd64, i386, arm64
0.12-0.24master0.12.x0.24.xamd64, i386
0.12-0.23master0.12.x0.23.xamd64, i386
0.12-0.22master0.12.x0.22.xamd64, i386
0.12-0.21master0.12.x0.21.xamd64, i386
0.12-0.20master0.12.x0.20.xamd64, i386
0.12-0.19master0.12.x0.19.xamd64, i386
0.11-0.18master0.11.x0.18.xamd64, i386

Point in time releases

The following Docker image tags are built once and can be used for reproducible builds. Its version never changes so you will have to update tags in your pipelines from time to time in order to stay up-to-date.

build

Docker TagGit RefTerraformTerragruntAvailable Architectures
latest-<tag>tag: <tag>latestlatestamd64, i386, arm64
1.5-0.50-<tag>tag: <tag>1.5.x0.50.xamd64, i386, arm64
1.5-0.49-<tag>tag: <tag>1.5.x0.49.xamd64, i386, arm64
1.5-0.48-<tag>tag: <tag>1.5.x0.48.xamd64, i386, arm64
1.5-0.47-<tag>tag: <tag>1.5.x0.47.xamd64, i386, arm64
1.5-0.46-<tag>tag: <tag>1.5.x0.46.xamd64, i386, arm64
1.4-0.50-<tag>tag: <tag>1.4.x0.50.xamd64, i386, arm64
1.4-0.49-<tag>tag: <tag>1.4.x0.49.xamd64, i386, arm64
1.4-0.48-<tag>tag: <tag>1.4.x0.48.xamd64, i386, arm64
1.4-0.47-<tag>tag: <tag>1.4.x0.47.xamd64, i386, arm64
1.4-0.46-<tag>tag: <tag>1.4.x0.46.xamd64, i386, arm64
1.3-0.50-<tag>tag: <tag>1.3.x0.50.xamd64, i386, arm64
1.3-0.49-<tag>tag: <tag>1.3.x0.49.xamd64, i386, arm64
1.3-0.48-<tag>tag: <tag>1.3.x0.48.xamd64, i386, arm64
1.3-0.47-<tag>tag: <tag>1.3.x0.47.xamd64, i386, arm64
1.3-0.46-<tag>tag: <tag>1.3.x0.46.xamd64, i386, arm64
1.2-0.41-<tag>tag: <tag>1.2.x0.41.xamd64, i386, arm64
1.2-0.40-<tag>tag: <tag>1.2.x0.40.xamd64, i386, arm64
1.2-0.39-<tag>tag: <tag>1.2.x0.39.xamd64, i386, arm64
1.2-0.38-<tag>tag: <tag>1.2.x0.38.xamd64, i386, arm64
1.2-0.37-<tag>tag: <tag>1.2.x0.37.xamd64, i386, arm64
1.1-0.39-<tag>tag: <tag>1.1.x0.39.xamd64, i386, arm64
1.1-0.38-<tag>tag: <tag>1.1.x0.38.xamd64, i386, arm64
1.1-0.37-<tag>tag: <tag>1.1.x0.37.xamd64, i386, arm64
1.1-0.36-<tag>tag: <tag>1.1.x0.36.xamd64, i386, arm64
1.1-0.35-<tag>tag: <tag>1.1.x0.35.xamd64, i386, arm64
1.0-0.38-<tag>tag: <tag>1.0.x0.38.xamd64, i386, arm64
1.0-0.37-<tag>tag: <tag>1.0.x0.37.xamd64, i386, arm64
1.0-0.36-<tag>tag: <tag>1.0.x0.36.xamd64, i386, arm64
1.0-0.35-<tag>tag: <tag>1.0.x0.35.xamd64, i386, arm64
1.0-0.34-<tag>tag: <tag>1.0.x0.34.xamd64, i386, arm64
0.15-0.34-<tag>tag: <tag>0.15.x0.34.xamd64, i386, arm64
0.15-0.33-<tag>tag: <tag>0.15.x0.33.xamd64, i386, arm64
0.15-0.32-<tag>tag: <tag>0.15.x0.32.xamd64, i386, arm64
0.15-0.31-<tag>tag: <tag>0.15.x0.31.xamd64, i386, arm64
0.15-0.30-<tag>tag: <tag>0.15.x0.30.xamd64, i386, arm64
0.14-0.34-<tag>tag: <tag>0.14.x0.34.xamd64, i386, arm64
0.14-0.33-<tag>tag: <tag>0.14.x0.33.xamd64, i386, arm64
0.14-0.32-<tag>tag: <tag>0.14.x0.32.xamd64, i386, arm64
0.14-0.31-<tag>tag: <tag>0.14.x0.31.xamd64, i386, arm64
0.14-0.30-<tag>tag: <tag>0.14.x0.30.xamd64, i386, arm64
0.13-0.34-<tag>tag: <tag>0.13.x0.34.xamd64, i386, arm64
0.13-0.33-<tag>tag: <tag>0.13.x0.33.xamd64, i386, arm64
0.13-0.32-<tag>tag: <tag>0.13.x0.32.xamd64, i386, arm64
0.13-0.31-<tag>tag: <tag>0.13.x0.31.xamd64, i386, arm64
0.13-0.30-<tag>tag: <tag>0.13.x0.30.xamd64, i386, arm64
0.12-0.24-<tag>tag: <tag>0.12.x0.24.xamd64, i386
0.12-0.23-<tag>tag: <tag>0.12.x0.23.xamd64, i386
0.12-0.22-<tag>tag: <tag>0.12.x0.22.xamd64, i386
0.12-0.21-<tag>tag: <tag>0.12.x0.21.xamd64, i386
0.12-0.20-<tag>tag: <tag>0.12.x0.20.xamd64, i386
0.12-0.19-<tag>tag: <tag>0.12.x0.19.xamd64, i386
0.11-0.18-<tag>tag: <tag>0.11.x0.18.xamd64, i386

Where <tag> refers to the chosen git tag from this repository.

:open_file_folder: Docker mounts

The working directory inside the Docker container is /data/ and should be mounted to your local filesystem where your Terragrant project resides. (See Examples for mount location usage.)

:computer: Usage

docker run --rm -v $(pwd):/data cytopia/terragrunt terragrunt <ARGS>
docker run --rm -v $(pwd):/data cytopia/terragrunt terraform <ARGS>

:capital_abcd: Environment variables

The following environment variables will ease your life when mounting directories into the docker container by maintaining file system permissions.

VariablesDefaultDescription
RUN_NON_ROOT0Set to 1 to run commands as user instead of root.
UID1000Set to the uid of your local user (id -u) if you want to run as non root.
GID1000Set to the gid of your local user (id -g) if you want to run as non root.

:information_source: Examples

1. Simple: Provision single sub-project on AWS

1.1 Project overview

Let's assume your Terragrunt project setup is as follows:

/my/tf                                              # Terragrunt project root
├── backend-app
   ├── main.tf
   └── terragrunt.hcl
├── frontend-app
   ├── main.tf
   └── terragrunt.hcl
├── mysql                                           # MySQL sub-project directory
   ├── main.tf
   └── terragrunt.hcl
├── redis
   ├── main.tf
   └── terragrunt.hcl
└── vpc
    ├── main.tf
    └── terragrunt.hcl

The MySQL sub-project you want to provision is at the releative path mysql/.

1.2 To consider

  1. Mount the terragrunt root project dir (/my/tf/) into /data/ into the container
  2. Use the workding dir (-w or --workdir) to point to your project inside the container
  3. Add AWS credentials from your environment to the container

1.3 Docker commands

# Initialize the MySQL project
docker run --rm \
  -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
  -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
  -e AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN \
  -u $(id -u):$(id -g) \
  -v /my/tf:/data \
  -w /data/mysql \
  cytopia/terragrunt terragrunt init

# Plan the MySQL project
docker run --rm \
  -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
  -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
  -e AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN \
  -u $(id -u):$(id -g) \
  -v /my/tf:/data \
  -w /data/mysql \
  cytopia/terragrunt terragrunt plan

# Apply the MySQL project
docker run --rm \
  -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
  -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
  -e AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN \
  -u $(id -u):$(id -g) \
  -v /my/tf:/data \
  -w /data/mysql \
  cytopia/terragrunt terragrunt --terragrunt-non-interactive apply

2. Complex: Provision single sub-project on AWS

2.1 Project overview

Let's assume your Terragrunt project setup is as follows:

/my/tf                                              # Terragrunt project root
└── envs
    └── aws
        ├── dev
        │   ├── eu-central-1
        │   │   ├── infra
        │   │   │   └── vpc-k8s                     # VPC sub-project directory
        │   │   │       ├── terraform.tfvars
        │   │   │       └── terragrunt.hcl
        │   │   ├── microservices
        │   │   │   └── api-gateway
        │   │   │       ├── terraform.tfvars
        │   │   │       └── terragrunt.hcl
        │   │   └── region.tfvars
        │   ├── global
        │   │   └── region.tfvars
        │   └── terragrunt.hcl
        └── _provider_include
            └── include_providers.tf

The VPC sub-project you want to provision is at the relative path envs/aws/dev/eu-centra-1/infra/vpc-k8s/.

2.2 To consider

  1. Mount the terragrunt root project dir (/my/tf/) into /data/ into the container
  2. Use the workding dir (-w or --workdir) to point to your project inside the container
  3. Add AWS credentials from your environment to the container

2.3 Docker commands

# Initialize the VPC project
docker run --rm \
  -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
  -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
  -e AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN \
  -u $(id -u):$(id -g) \
  -v /my/tf:/data \
  -w /data/envs/aws/dev/eu-central-1/infra/vpc-k8s \
  cytopia/terragrunt terragrunt init

# Plan the VPC project
docker run --rm \
  -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
  -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
  -e AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN \
  -u $(id -u):$(id -g) \
  -v /my/tf:/data \
  -w /data/envs/aws/dev/eu-central-1/infra/vpc-k8s \
  cytopia/terragrunt terragrunt plan

# Apply the VPC project
docker run --rm \
  -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
  -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
  -e AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN \
  -u $(id -u):$(id -g) \
  -v /my/tf:/data \
  -w /data/envs/aws/dev/eu-central-1/infra/vpc-k8s \
  cytopia/terragrunt terragrunt --terragrunt-non-interactive apply

Docker images

Save yourself from installing lot's of dependencies and pick a dockerized version of your favourite linter below for reproducible local or remote CI tests:

GitHubDockerHubTypeDescription
awesome-ciaci-hub-imgBasicTools for git, file and static source code analysis
file-lintflint-hub-imgBasicBaisc source code analysis
linkchecklinkcheck-hub-imgBasicSearch for URLs in files and validate their HTTP status code
ansibleansible-hub-imgAnsibleMultiple versions and flavours of Ansible
ansible-lintalint-hub-imgAnsibleLint Ansible
gofmtgfmt-hub-imgGoFormat Go source code [1]
goimportsgimp-hub-imgGoFormat Go source code [1]
golintglint-hub-imgGoLint Go code
eslintelint-hub-imgJavascriptLint Javascript code
jsonlintjlint-hub-imgJSONLint JSON files [1]
kubevalkubeval-hub-imgK8sLint Kubernetes files
checkmakecm-hub-imgMakeLint Makefiles
phpcbfpcbf-hub-imgPHPPHP Code Beautifier and Fixer
phpcspcs-hub-imgPHPPHP Code Sniffer
phplintplint-hub-imgPHPPHP Code Linter [1]
php-cs-fixerpcsf-hub-imgPHPPHP Coding Standards Fixer
banditbandit-hub-imgPythonA security linter from PyCQA
blackblack-hub-imgPythonThe uncompromising Python code formatter
mypymypy-hub-imgPythonStatic source code analysis
pycodestylepycs-hub-imgPythonPython style guide checker
pydocstylepyds-hub-imgPythonPython docstyle checker
pylintpylint-hub-imgPythonPython source code, bug and quality checker
terraform-docstfdocs-hub-imgTerraformTerraform doc generator (TF 0.12 ready) [1]
terragrunttg-hub-imgTerraformTerragrunt and Terraform
terragrunt-fmttgfmt-hub-imgTerraformterraform fmt for Terragrunt files [1]
yamlfmtyfmt-hub-imgYamlFormat Yaml files [1]
yamllintylint-hub-imgYamlLint Yaml files

[1] Uses a shell wrapper to add enhanced functionality not available by original project.

Makefiles

Visit cytopia/makefiles for dependency-less, seamless project integration and minimum required best-practice code linting for CI. The provided Makefiles will only require GNU Make and Docker itself removing the need to install anything else.

:page_facing_up: License

MIT License

Copyright (c) 2019 cytopia