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 for AWS ECR public registries #128

Closed
nonsense opened this issue Jan 20, 2021 · 4 comments
Closed

Support for AWS ECR public registries #128

nonsense opened this issue Jan 20, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@nonsense
Copy link

nonsense commented Jan 20, 2021

What would you like to be added

At the moment when I try to authenticate with a public AWS ECR registry, I get the following error:

#!/bin/bash -eo pipefail
# get-login-password returns a password that we pipe to the docker login command
aws ecr get-login-password --region $AWS_REGION --profile default | docker login --username AWS --password-stdin $AWS_ECR_ACCOUNT_URL
Error response from daemon: login attempt to https://**************/v2/ failed with status: 400 Bad Request

I've tried various options for AWS_ECR_ACCOUNT_URL env var, such as public.ecr.aws/xxxxxxxx or public.ecr.aws, but nothing seems to work.

I believe the reason is the use of aws ecr, instead of aws ecr-public, which is suggested by AWS when inspecting the View push comments screen:

aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/xxxxxxxx

Additionally I had to add more permissions to the AWS IAM account policy when switching from Private to Public registry, namely:

                "ecr-public:*",
                "sts:*"
@allanvobraun
Copy link

Please, any workarounds?

@brivu brivu self-assigned this Feb 17, 2022
@brivu
Copy link
Contributor

brivu commented Feb 17, 2022

Hey @allanvobraun,

I'm working on a major refactor of this Orb right now and will include public registry support. It should be done at the end of this week or early next week.

Thanks for letting us know!

Best,
Brian

@allanvobraun
Copy link

It will be amazing! It will greatly reduce my setup. I'm currently using the aws cli orb.
If you want help testing let me know.

@brivu
Copy link
Contributor

brivu commented Mar 15, 2022

Hey @allanvobraun!

This issue has been addressed and merged in this PR: #172

Cheers!
Brian

@brivu brivu closed this as completed Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants