How do I rebuild the Elastic Deploy Runner (EDR) and Kaniko Images for Gruntwork Pipelines?
A customer asked, "How can I rebuild the Docker images for Elastic Deploy Runner (EDR) and Kaniko?"
1. Git clone `terraform-aws-ci`: `git clone git@github.com:gruntwork-io/terraform-aws-ci.git` 1. In `terraform-aws-ci`, checkout the version to use (might as well update to latest while you are at it, which is `git checkout v0.39.3`) 1. Switch dir to the `ecs-deploy-runner` docker folder: `cd modules/ecs-deploy-runner/docker/deploy-runner` 1. Run docker build to build the image, passing the vars: `docker build --build-arg GITHUB_OAUTH_TOKEN --tag 241595741642.dkr.ecr.us-east-1.amazonaws.com/ecs-deploy-runner:v0.39.3 --build-arg terraform_version=1.0.4 --build-arg terragrunt_version=v0.31.8` . - NOTE: If you are running on an M1 mac, you must pass in the `--platform=linux/amd64` argument to build an amd64 based image instead of an arm64 based image. 1. Authenticate to ECR: `aws ecr get-login-password --region "us-west-2" | docker login --username AWS --password-stdin 241595741642.dkr.ecr.us-east-1.amazonaws.com` 1. Push the image: `docker push 241595741642.dkr.ecr.us-east-1.amazonaws.com/ecs-deploy-runner:v0.39.3` 1. Repeat for the kaniko folder: `cd modules/ecs-deploy-runner/docker/kaniko and run docker build --build-arg GITHUB_OAUTH_TOKEN --tag 241595741642.dkr.ecr.us-east-1.amazonaws.com/kaniko:v0.39.3 .` 1. Update the image tags to v0.39.3 in common.hcl 1. Deploy the new image by running `terragrunt apply` in each accounts’ `ecs-deploy-runner` folder.