blob: 30e93c00d0bbad6fa86860ccb77c46639130d945 [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
Saheer Babu734d2ad2024-12-19 09:38:47 +000017export ECR=${PRIVATE_CONTAINER_REGISTRY}
Kelley Spooncd089f02024-09-12 11:25:41 -050018export REPO=iar
Saheer Babu734d2ad2024-12-19 09:38:47 +000019aws ecr get-login-password --region eu-west-1|docker login --username AWS --password-stdin $ECR
Kelley Spooncd089f02024-09-12 11:25:41 -050020
Saheer Babu734d2ad2024-12-19 09:38:47 +000021for image in $(aws ecr list-images --region eu-west-1 --repository-name $REPO | \
Kelley Spooncd089f02024-09-12 11:25:41 -050022 grep imageTag | \
23 awk '{print $2}' | \
24 sed 's/"//g'); do
25
26 docker pull $ECR/$REPO:$image
27done