Docker Desktop for Windows / Mac 2.4.0.0 or later, Amazon ECR Credential Helper It is now included.
Docker for Mac Stable release notes - Docker Desktop Community 2.4.0.0 https://docs.docker.com/docker-for-windows/release-notes/#docker-desktop-community-2400
It saves you the trouble of logging in to ECR with a command like the following each time.
$ aws ecr get-login-password | docker login --username AWS --password-stdin https://<aws_account_id>.dkr.ecr.<region>.amazonaws.com
There are no settings specific to Docker Desktop, so just add the following to ~ / .docker / config.json
.
config.json
"credHelpers": {
"<aws_account_id>.dkr.ecr.<region>.amazonaws.com": "ecr-login"
}
AWS credentials refer to ~ / .aws / credentials
or environment variables,
If you want to use a specific named profile in your credentials,
Set the environment variable ʻAWS_PROFILE`.
The Credential Helper log is output to ~ / .ecr / log / ecr-login.log
.
It's easy, but that's it. I'm glad if you can use it as a reference.
Recommended Posts