Created
August 25, 2023 23:52
-
-
Save SafeEval/d05f6f1f2b04276c99f6b1cbb083f843 to your computer and use it in GitHub Desktop.
Docker login to ECR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# #!/bin/bash | |
# Tired of looking this up. | |
# Assumes a properly configured AWS CLI profile/credentials and AWS_REGION is set. | |
aws ecr get-login-password | docker login -u AWS --password-stdin "https://$(aws sts get-caller-identity --query 'Account' --output text).dkr.ecr.$AWS_REGION.amazonaws.com" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment