✅ Supports multi-platforms (x86_64, arm64)
This Dockerfile builds a cli where you can run terraform, gcloud, and go commands.
Author: Lim Chooi Guan (AWS Architect, AWS Certified Solutions Architect)
- Docker
- Google account
gcloud
, the GCloud CLIterraform
terratest_log_parser
go
-
Clone this repo.
-
Open up a terminal window to this directory and run:
docker build -t local/terraform-gcloud-go-cli:latest .
-
Open up a terminal to your terraform module folder, now run the container using the new image:
docker run --rm --name terraform-gcloud-go-cli -v $(pwd):/workspace -it local/terraform-gcloud-go-cli bash
-
In the container, test that your gcloud CLI and other installed software works by running:
gcloud --version go version terraform -v
-
(Optional) To build specific platform versions, and push to your own Dockerhub registry, run:
`docker buildx build --platform linux/amd64,linux/arm64 -t YOUR_DOCKERHUB_ID/terraform-gcloud-go-cli:latest --push .`
-
Done! Have a coffee! ☕️