blob: 344f0824149b370f9a6ebbfd3d559def9f0c53a6 [file] [log] [blame]
Kelley Spoonb4880c32022-10-05 06:46:28 -05001#!/bin/bash
2
Paul Sokolovskyd4b45882022-10-07 21:53:05 +03003set -e
4
Kelley Spoonb4880c32022-10-05 06:46:28 -05005docker --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 Spoonb4880c32022-10-05 06:46:28 -050018export REPO=misra
Saheer Babu734d2ad2024-12-19 09:38:47 +000019aws ecr get-login-password --region eu-west-1|docker login --username AWS --password-stdin $ECR
Kelley Spoonb4880c32022-10-05 06:46:28 -050020
Saheer Babu734d2ad2024-12-19 09:38:47 +000021for image in $(aws ecr list-images --region eu-west-1 --repository-name $REPO | \
Kelley Spoonb4880c32022-10-05 06:46:28 -050022 grep imageTag | \
23 awk '{print $2}' | \
24 sed 's/"//g'); do
25
26 docker pull $ECR/$REPO:$image
27done