LoginSignup
29

More than 5 years have passed since last update.

【小ネタ】Docker17.06以上からAmazon ECRへのdockerログインコマンドが変わった

Posted at

AWSから案内が来ているが、Dockerエンジンの17.06以降からECR(Amazon EC2 Container Registry)へのdocker loginのコマンドが変わったので簡単なメモ

docker for macのstableが17.06になったのでそこそこ需要ありそう。

要約

  • Emailのオプション(-e)が必須になったので、つけない場合は明示的に[--no-include-email]をつけてねって話

dockerバージョンの確認

$ docker --version
Docker version 17.06.0-ce, build 02c1d87

ECRへのログイン

##17.05以下のコマンド $は式展開なので必要です
##これまでのコマンドだとemailフラグないと怒られます
$(aws ecr get-login --region ap-northeast-1)
unknown shorthand flag: 'e' in -e
See 'docker login --help'.


##17.06以上
##これでOK --no-include-emailが必要
$(aws ecr get-login --region ap-northeast-1 --no-include-email)

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
29