Kelley Spoon | b4880c3 | 2022-10-05 06:46:28 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
Paul Sokolovsky | d4b4588 | 2022-10-07 21:53:05 +0300 | [diff] [blame] | 3 | set -e |
| 4 | |
Kelley Spoon | b4880c3 | 2022-10-05 06:46:28 -0500 | [diff] [blame] | 5 | docker --version |
| 6 | |
| 7 | if ! type aws |
| 8 | then |
| 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 |
| 14 | fi |
| 15 | |
| 16 | aws configure list |
Saheer Babu | 734d2ad | 2024-12-19 09:38:47 +0000 | [diff] [blame^] | 17 | export ECR=${PRIVATE_CONTAINER_REGISTRY} |
Kelley Spoon | b4880c3 | 2022-10-05 06:46:28 -0500 | [diff] [blame] | 18 | export REPO=misra |
Saheer Babu | 734d2ad | 2024-12-19 09:38:47 +0000 | [diff] [blame^] | 19 | aws ecr get-login-password --region eu-west-1|docker login --username AWS --password-stdin $ECR |
Kelley Spoon | b4880c3 | 2022-10-05 06:46:28 -0500 | [diff] [blame] | 20 | |
Saheer Babu | 734d2ad | 2024-12-19 09:38:47 +0000 | [diff] [blame^] | 21 | for image in $(aws ecr list-images --region eu-west-1 --repository-name $REPO | \ |
Kelley Spoon | b4880c3 | 2022-10-05 06:46:28 -0500 | [diff] [blame] | 22 | grep imageTag | \ |
| 23 | awk '{print $2}' | \ |
| 24 | sed 's/"//g'); do |
| 25 | |
| 26 | docker pull $ECR/$REPO:$image |
| 27 | done |