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