Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support public.ecr.aws #322

Open
gdamjan opened this issue Jan 22, 2021 · 3 comments
Open

support public.ecr.aws #322

gdamjan opened this issue Jan 22, 2021 · 3 comments

Comments

@gdamjan
Copy link
Contributor

gdamjan commented Jan 22, 2021

AWS has introduced public ECR registries, and when configured the url of the registry is public.ecr.aws. The same url is used for both push and pull.

docker-image-resource currently won't supply AWS credentials unless it matches the ECR regex
https://github.com/concourse/docker-image-resource/blob/master/assets/out#L232

https://aws.amazon.com/about-aws/whats-new/2020/12/announcing-amazon-ecr-public-and-amazon-ecr-public-gallery/

@gdamjan
Copy link
Contributor Author

gdamjan commented Jan 22, 2021

additionally, the command to get credentials from ECR into docker have changed

aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/<alias>
...
docker push public.ecr.aws/<alias>/<namespace>/<repository>

@vidolch
Copy link

vidolch commented Nov 18, 2021

Is there any development in this? Seems like pushing public image is not working:

WARN[0000] ECR integration is experimental and untested 
INFO[0002] pushing tag(s) latest
ERRO[0002] pushing image failed: pushing tag(s): POST https://********.dkr.ecr.*******.amazonaws.com/v2/********/blobs/uploads/: NAME_UNKNOWN: The repository with name '********' does not exist in the registry with id '********' 

@eckdanny
Copy link

The [simplest/most-common?] use-case for public ECR instead of Docker Hub (subject to rate-limits):

...workloads running in AWS will get unlimited data bandwidth from any region when pulling publicly shared images hosted on AWS.
-AWS

If @gdamjan's sleuthing is correct, that RegEx constraint should definitely be relaxed in order for a simple pipeline (below) to work, rt?

ECR_REGISTRY_PATTERN='/[a-zA-Z0-9][a-zA-Z0-9_-]*\.dkr\.ecr\.[a-zA-Z0-9][a-zA-Z0-9_-]*\.amazonaws\.com(\.cn)?[^ ]*/'

simple pipeline
---
resources:
- name: node-image
  type: registry-image
  source:
    tag: lts-gallium
    repository: public.ecr.aws/docker/library/node
[...]

jobs:
- name: my-job
  plan:
    - task: use-node-image
      image: node-image
      config: [...]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants