15

How to make an ECR repository public for anybody to pull from. I see the policy document in the permission sections is where I should make permission changes. But it's not working, and I still need to get authenticated with the IAM user.

Permission Options

Vineeth
  • 692
  • 3
  • 9
  • 18

3 Answers3

15

Amazon ECR currently supports private images. See official AWS ECR FAQ:

https://aws.amazon.com/ecr/faqs/

Q: Can Amazon ECR host public container images?

Amazon ECR currently supports private images. However, using IAM resource-based permissions, you can configure policies for each repository to allow access to IAM users, roles, or other AWS accounts.

You can use Docker Hub or other public repositories.

https://hub.docker.com/

Community
  • 1
  • 1
minamijoyo
  • 3,305
  • 1
  • 18
  • 20
  • Yes I have a dockerhub account. its for some other proj I need ECS repo. Only problem for me is to get the 'get ecr login' thing working when I need to pull from it. It then prompts for one more login when I do. Something I can't automate. Any ideas? – Vineeth Aug 12 '17 at 04:02
  • 1
    ECR's token expires for 12 hours. So, if you want to use `docker pull` in your scripts, login every time before pull. `$(aws ecr get-login) && docker pull` . – minamijoyo Aug 12 '17 at 04:46
7

Amazon just released support for public ECR repositories!

https://aws.amazon.com/blogs/aws/amazon-ecr-public-a-new-public-container-registry/

dschofie
  • 166
  • 1
  • 5
5

check out https://github.com/monken/aws-ecr-public. It's a solution that provisions a serverless API Gateway to make ECR repositories public. It also supports custom domains.

monken
  • 116
  • 1
  • 4