Created
September 22, 2022 14:50
-
-
Save igordrnobrega/3f7745000dce1be6783bacb1c4bfc251 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # Defined in - @ line 1 | |
| function login-aws --description 'AWS ECR login for docker' | |
| set profile $argv[1] | |
| set region $argv[2] | |
| set account $AWS_PERSONAL_ACCOUNT_ID | |
| set -e argv[1] | |
| if test "$region" = "" | |
| set region "us-east-1" | |
| end | |
| if test "$profile" = $COMPANY_NAME | |
| echo $COMPANY_NAME "profile" | |
| set account $AWS_COMPANY_ECR_ACCOUNT_ID | |
| end | |
| aws --region $region --profile $profile ecr get-login-password | docker login --username AWS --password-stdin $account.dkr.ecr.$region.amazonaws.com | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment