blob: 3f8fc3483317f89a3266d339424931122e1302ea [file] [log] [blame]
Kelley Spooncd089f02024-09-12 11:25:41 -05001#!/bin/bash
2
3set -e
4
5docker --version
6
7if ! type aws
8then
9 sudo apt-get -y -qq update
10 sudo apt-get -y -qq install --no-install-recommends unzip
11 curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
12 unzip awscliv2.zip
13 sudo ./aws/install
14fi
15
16aws configure list
17export ECR=987685672616.dkr.ecr.us-east-1.amazonaws.com
18export REPO=iar
19aws ecr get-login-password --region us-east-1|docker login --username AWS --password-stdin $ECR
20
21for image in $(aws ecr list-images --region us-east-1 --repository-name $REPO | \
22 grep imageTag | \
23 awk '{print $2}' | \
24 sed 's/"//g'); do
25
26 docker pull $ECR/$REPO:$image
27done