docker icon indicating copy to clipboard operation
docker copied to clipboard

Not working with ECR

Open nilroy opened this issue 10 years ago • 3 comments

Cookbook version

2.7.1

Chef-client version

12.5.1

Platform Details

ubuntu 14.04

Scenario:

We are using AWS ECR for storing our private images. I am able to successfully login to the registry by running a bash resource running eval "$(aws ecr get-login --region us-east-1)"

I defined a docker_image resource and trying to pull an image from the ECR. But it alwasys says the image not found with following error:

Docker::Error::NotFoundError
----------------------------
No such image: <ecr url>/image:latest

But I can pull the image using command line on the instance. I have no idea whats wrong with my cookbook. My resource definition is as follows

docker_image 'haproxy' do
  repo '<ecr_url>/image'
  read_timeout 900
  action :pull
end

Steps to Reproduce:

Expected Result:

Actual Result:

nilroy avatar May 25 '16 08:05 nilroy

Actually I got it working . I did not defined the docker_registry resource. I followed the comments in https://github.com/chef-cookbooks/docker/issues/660 and using the code https://gist.github.com/chrisferry/f716d3e74d534598eaa5. Which works perfectly. Thanks to @chrisferry.

nilroy avatar May 25 '16 09:05 nilroy

@nilroy can you provide more information on what you did? I am having the same issue.

brooksa321 avatar Dec 27 '16 19:12 brooksa321

@nilroy Can you explain how did you configure this ? I am facing same issue.

rashidmahmood avatar Mar 02 '17 10:03 rashidmahmood