Use Amazon ECR Credential Helper with Docker Desktop

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

Use Amazon ECR Credential Helper with Docker Desktop
Use Puphpeteer with Docker
Use ngrok with Docker
Use GDAL with Python with Docker
[Docker] Use whenever with Docker + Rails
Why use orchestration tools with Docker
Let's use Amazon Textract with Ruby
Use cuda11.0 with pytorch using Docker
[Rails] How to use rails console with docker
Use Symbolic Link with Docker multi-stage builds
Use ZStandard with .NET Core + Docker (Alpine)
Comfortable development life with WSL2 + Docker Desktop + GPU
How to use docker compose with NVIDIA Jetson
How to use nginx-ingress-controller with Docker for Mac
Desktop: OpenCV Use EqualizeHist With Add Weight For RGB
Comfortable Docker environment created with WSL2 CentOS7 and Docker Desktop