Photo by David Knox on Unsplash
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Linux/docker
- outline
An error occurs when you are using "docker login" command.
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
- command
docker login --username AWS -p $(aws ecr get-login-password --region ap-northeast-2) <account>.dkr.ecr.ap-northeast-2.amazonaws.com/
- resolution
aws ecr get-login-password --region ap-northeast-2 | docker login --username AWS --password-stdin "$(aws sts get-caller-identity --query Account --output text).dkr.ecr.ap-northeast-2.amazonaws.com"