Terraform and AWS CLI Docker image
๐ฆ Supported tags and respective Dockerfile links
Repository available on Docker Hub: zenika/terraform-aws-cli
- zenika/terraform-aws-cli:latest
- zenika/terraform-aws-cli:2.1
- zenika/terraform-aws-cli:2.0-alpine
- zenika/terraform-aws-cli:2.0-debian
- zenika/terraform-aws-cli:1.0-alpine
- zenika/terraform-aws-cli:1.0-debian
โ ๏ธ Alpine build support is deprecated, new versions will only be debian based.
๐ก Motivation
The goal is to create a minimalist and lightweight image with these tools in order to reduce network and storage impact.
This image gives you the flexibility to be used for development or as a base image as you see fits.
๐ง What's inside ?
Tools included:
- AWS CLI, see available version on the pip repository
- Terraform CLI, see available versions on the project release page
- Git for Terraform remote module usage, see available versions on the Debian Packages repository
- jq to process JSON returned by AWS, see available versions on the Debian Packages repository
๐ Usage
Launch the CLI
Simply launch the container and use the CLI as you would on any other platform, for instance using the latest image:
docker container run -it --rm -v ${PWD}:/workspace zenika/terraform-aws-cli:latest
The
--rm
flag will completely destroy the container and its data on exit.
Build the image
You can build the image locally directly from the Dockerfiles :
docker image build -t zenika/terraform-aws-cli:dev .
Optionally, it is possible to choose the tools desired versions using Docker builds arguments :
# Set tools desired versions
AWS_CLI_VERSION=1.16.313
TERRAFORM_VERSION=0.12.19
# Build the image:
docker image build --build-arg AWS_CLI_VERSION=$AWS_CLI_VERSION --build-arg TERRAFORM_VERSION=$TERRAFORM_VERSION -t zenika/terraform-aws-cli:dev .
๐ Contributions
Do not hesitate to contribute by filling an issue or a PR !
๐ License
This project is under the Apache License 2.0