blob: 30e93c00d0bbad6fa86860ccb77c46639130d945 [file] [log] [blame]
#!/bin/bash
set -e
docker --version
if ! type aws
then
sudo apt-get -y -qq update
sudo apt-get -y -qq install --no-install-recommends unzip
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
fi
aws configure list
export ECR=${PRIVATE_CONTAINER_REGISTRY}
export REPO=iar
aws ecr get-login-password --region eu-west-1|docker login --username AWS --password-stdin $ECR
for image in $(aws ecr list-images --region eu-west-1 --repository-name $REPO | \
grep imageTag | \
awk '{print $2}' | \
sed 's/"//g'); do
docker pull $ECR/$REPO:$image
done