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

Add support for gitlab as build registry #965

Open
rochaporto opened this issue Sep 27, 2019 · 10 comments
Open

Add support for gitlab as build registry #965

rochaporto opened this issue Sep 27, 2019 · 10 comments

Comments

@rochaporto
Copy link
Contributor

We're trying to use a gitlab registry as backend for build images.

The setup is done using a helm chart, and passing in the configuration:

config:
  DockerRegistry:
    token_url: "https://gitlab.cern.ch/jwt/auth"
    username: <username>
    password: <password>
  BinderHub:
    image_prefix: gitlab-registry.cern.ch/binder/images/build-
registry:
  url: "gitlab-registry.cern.ch"

After debugging the multiple authz errors, it seems to boil down to:

  1. missing "service": "container_registry" when fetching a valid token using the token_url (this is required by gitlab)
  2. the build image name logic assumes a dockerhub like structure (up to two levels in the path). The gitlab registry allows more and we rely on this (see above with binder/images/actual-image-name)

I'll push a PR soon, just figuring out the best way to make 2. generic.

@betatim
Copy link
Member

betatim commented Sep 27, 2019

That would be great! There are a few parts of the code where we have taken shortcuts because we made assumptions about the structure of the URL. Probably a lot of them would be cleaner if we use more of urllib.parse() instead of blah.split("/")[-2].

@bdrian

This comment has been minimized.

@dichaelen
Copy link

Hi @rochaporto,

As of primo February 2020 is there any solution to this? Or are anybody working on it to your knowledge? We are facing the same challenge and would like to have as much input as possible, A shortterm solution is to use our legacy registry outside GitLab, but it is not sustainable.

thanks in advance!

@betatim
Copy link
Member

betatim commented Feb 13, 2020

I don't think anyone has worked on this.

@rochaporto
Copy link
Contributor Author

Sorry, i left this here and never pushed the PR. Will try to do it asap.

@ctr26
Copy link
Contributor

ctr26 commented Feb 18, 2021

@ctr26
Copy link
Contributor

ctr26 commented Feb 19, 2021

Update, it doesn't work for finding pre built images it just successfully pushes

@darwyncook
Copy link

We are interested in using Gitlab for a build registry. We need to have our registry on-prem, and have gitlab available. He there been any progress on this?

@manics
Copy link
Member

manics commented May 16, 2023

There's an open PR:
#1628

@ctr26
Copy link
Contributor

ctr26 commented May 17, 2023

Best solution I found was to self host a dockerhub, our docker registry was throttling

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

Successfully merging a pull request may close this issue.

7 participants