以下の内容はhttps://inokara.hateblo.jp/entry/2016/09/03/093201より取得しました。


Amazon ECR から docker pull する為に最低限必要な手順

tl;dr

整理した。

大前提

  • 最低でも IAM Policy の AmazonEC2ContainerRegistryReadOnly をつけた IAM Role 又は IAM User を使う

EC2 上での手順

前提

  • EC2 には 管理ポリシーの AmazonEC2ContainerRegistryReadOnly をつけた IAM Role が付いている

手順

  • docker login コマンドを取得する
aws --region ap-northeast-1 ecr get-login
  • docker login する
docker login -u AWS -p xxxxxxxxxxxxxxxx -e none https://0000000000000.dkr.ecr.ap-northeast-1.amazonaws.com
  • docker pull する
docker pull 0000000000000.dkr.ecr.ap-northeast-1.amazonaws.com/oreno-image

EC2 以外の環境での手順

前提

  • 管理ポリシーの AmazonEC2ContainerRegistryReadOnly をつけた IAM User を作成
  • IAM User の認証情報(アクセスキー、シークレットアクセスキー)を発行しておいて ~/.aws/credentials に登録しておく

手順

  • docker login コマンドを取得する
aws --profile oreno-profile --region ap-northeast-1 ecr get-login
  • docker login する
docker login -u AWS -p xxxxxxxxxxxxxxxx -e none https://0000000000000.dkr.ecr.ap-northeast-1.amazonaws.com
  • docker pull する
docker pull 0000000000000.dkr.ecr.ap-northeast-1.amazonaws.com/oreno-image

以上

メモでした。




以上の内容はhttps://inokara.hateblo.jp/entry/2016/09/03/093201より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14