1

When I am trying to pull docker image from ECR, I am getting the below error:

Get https://3242344.dkr.ecr.ap-south-1.amazonaws.imagename/latest: no basic auth credentials

Docker service is running fine and I am able to list the repositories.

zilcuanu
  • 3,451
  • 8
  • 52
  • 105

2 Answers2

2

First, you need to Authenticate your Docker logins to the Amazon ECR:

aws ecr get-login --region <<region>> --no-include-email

Refer below link for Amazon ECR Registries authentication: https://docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html#registry_auth

Describe your image within a repository by using below command:

aws ecr describe-images --repository-name amazonlinux

Pull the image by using below command:

docker pull aws_account_id.dkr.ecr.us-west-2.amazonaws.com/amazonlinux:latest

For more information please refer below link: https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-pull-ecr-image.html

Aress Support
  • 1,315
  • 5
  • 12
0

You need to retrieve the docker login command using AWS CLI

$(aws ecr get-login --no-include-email --region <your region>)

More info in Getting Started with Amazon ECR.

jogold
  • 6,667
  • 23
  • 41