Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion subt_ign/scripts/subt_docker.bash
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ fi

# Log into docker
echo "Logging into docker"
$(aws ecr get-login --no-include-email --region us-east-1)
awsVersion=`aws --version`
if [[ "$awsVersion" == *"aws-cli/1"* ]]; then
$(aws ecr get-login --no-include-email --region us-east-1)
elif [[ "$awsVersion" == *"aws-cli/2"* ]]; then
$(aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 200670743174.dkr.ecr.us-east-1.amazonaws.com)
else
echo "Unsupported aws cli version $awsVersion"
exit
fi

if [ $? != 0 ]; then
echo "Failed to log into docker. Check your AWS credentials."
Expand Down