LoginSignup
0
0

レガシー環境の更新をしていて、awscli周りでハマったので残します。

TL;DR

  • AWS CLIのバージョンがv1だった
  • Dockerのバージョンが17だった

AWS CLIv1からv2へ

既存システムはこのように書かれていました。

aws ecr get-login --region ap-northeast-1

AWS CLIをv2に上げたことによって非推奨になった書き方を変える必要がありました。
(今はv1でも非推奨になっているらしい。。)
https://dev.classmethod.jp/articles/aws-cli-v2-ecr-get-login-password/

aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin https://<AWS ACCOUNT ID>.dkr.ecr.ap-northeast-1.amazonaws.com

ここでunknown flag: --password-stdinエラーが発生

unknown flag: --password-stdin

調査を進めると、Dockerのバージョンが17で稼働していることが判明。
Dockerバージョンを最新に更新したら治りました。

さいごに

レガシーツライ

0
0
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
0
0