blob: 344f0824149b370f9a6ebbfd3d559def9f0c53a6 [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=misra
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