Build a SMALL container image for CICD pipeline usage to deploy resources to AWS using terraform.
I hoped to achieve more, but thats what it is. 🤷🏻
docker inspect -f "{{ .Size }}" amazon/aws-cli:latest | numfmt --to=si
405M
docker inspect -f "{{ .Size }}" zenika/terraform-aws-cli:latest | numfmt --to=si
346M
docker inspect -f "{{ .Size }}" aws-tf-deployer-image:local | numfmt --to=si
204M
Latest builds are also pushed to this public Dockerhub repository: https://hub.docker.com/r/hikkoiri/aws-tf-deployer-image
docker build -t aws-tf-deployer:local .
If you are using a Mac with ARM processor add the following flag to the build command:
--platform=linux/amd64
Turns out that other people also struggled to install the AWS CLI on alpine with the missing glibc libraries. This post helped a lot.