[aws-cli][v2]ECRにログインするときの手順

LINEで送る
Pocket

https://docs.aws.amazon.com/cli/latest/reference/ecr/get-login-password.html

  •  aws configure
$ aws configure
AWS Access Key ID [********************]:
AWS Secret Access Key [*******************]:
Default region name [None]: ap-northeast-1
Default output format [None]:
  • 確認
$ aws ecr get-login-password
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • get-login-password
$ aws ecr get-login-password | docker login --username AWS --password-stdin xxxxxxxxxxxxx.dkr.ecr.ap-northeast-1.amazonaws.com Login Succeeded
  • get-login-password(profile指定する場合)
$ aws ecr get-login-password --profile ecr | docker login --username AWS --password-stdin xxxxxxxxxxxxx.dkr.ecr.ap-northeast-1.amazonaws.com
Login Succeeded

Was this helpful?

0 / 0

コメントを残す 0

Your email address will not be published. Required fields are marked *