Not working with ECR
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:
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 can you provide more information on what you did? I am having the same issue.
@nilroy Can you explain how did you configure this ? I am facing same issue.