1
2

More than 1 year has passed since last update.

[簡易]ローカルイメージをECRにpushする手順

Last updated at Posted at 2022-03-11

手順

  • ECRリポジトリの作成

  • ECRレジストリの設定(拡張スキャンなど)
    拡張スキャンの「連続スキャン」は、ECRへのプッシュ時の初期スキャンと、関連する新しいCVEが公開され たときの自動再スキャンが含まれる

  • ECRアクセス用のIAMユーザー(プログラムアクセス)作成

  • aws cli --profile xxxxでprofile作成

  • ECRレジストリに対してDockerクライアントを認証する

aws ecr get-login-password --region [region] | docker login --username AWS --password-stdin [aws_account_id].dkr.ecr.[region].amazonaws.com
  • ECRレジストリに保持する用にイメージにタグをつける
docker tag image_id [aws_account_id].dkr.ecr.[region].amazonaws.com/[my-repository:tag]
  • ECRにpush
docker push [aws_account_id].dkr.ecr.[region].amazonaws.com/[my-repository:tag]

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2