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 and document pushing to AWS ECR #65

Closed
3 tasks done
yuvipanda opened this issue May 13, 2021 · 5 comments · Fixed by #78
Closed
3 tasks done

Support and document pushing to AWS ECR #65

yuvipanda opened this issue May 13, 2021 · 5 comments · Fixed by #78
Labels
enhancement New feature or request

Comments

@yuvipanda
Copy link
Collaborator

yuvipanda commented May 13, 2021

Description

I want to automatically build and push images to a repository that uses docker credential stores rather than username / password to log in. This is not a documented use-case of this repository, so it's unclear whether it is supported or not.

To start off, let's try getting this action to work with Amazon ECR, as this is a very common registry to use as a test case.

Benefit

This would be valuable because many container registries don't user U/P credentialing (like AWS ECR). Documenting this process for one of them would make it easier for others to understand how they could apply it to other registries.

Implementation

We could test this out by following the Amazon ECR action here:

https://github.com/aws-actions/amazon-ecr-login#usage

Tasks

Alternative approaches

Install repo2docker manually and push, which I've done in amfriesz/lpdaac_hls_tutorial#2.

@yuvipanda yuvipanda added the enhancement New feature or request label May 13, 2021
@welcome
Copy link

welcome bot commented May 13, 2021

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@choldgraf
Copy link
Member

@yuvipanda has this been closed by #70 ?

@choldgraf choldgraf changed the title Support pushing to registries that don't use username / password (like AWS ECR) Support and document pushing to AWS ECR Aug 26, 2021
@choldgraf
Copy link
Member

I've updated the top comment on this one, as I think that it was worded a little unclearly. It's not focused on documenting how to set up on Amazon ECR as a test-case so that others have a concrete example to follow for other registries as well.

@consideRatio
Copy link
Member

consideRatio commented Aug 31, 2021

Here is an example of providing credentials, configuring docker to use them, and then doing a docker push with them.

https://github.com/pangeo-data/jupyter-earth/blob/8d2f1b03202158c863ff077dc04c07ec695e355f/.github/workflows/build-image.yaml#L49-L79

@GeorgianaElena
Copy link
Member

GeorgianaElena commented Sep 7, 2021

Finally concluded that the action does indeed work with pushing to an Amazon ECR registry 🎉

I have a working example in this repo here. Note that DOCKER_CONFIG needs to be set in order for repo2docker-action to know where to find the credentials stored in previous steps. (ref: docker/login-action#34)

Without this, pushing the image fails with no basic auth credentials.

(thanks @sgibson91 for pointing me to docker/build-push-action, this was where the quest started from)

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

Successfully merging a pull request may close this issue.

4 participants