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

Enable Docker Registry #143

Open
fungalcofe opened this issue Mar 16, 2021 · 7 comments
Open

Enable Docker Registry #143

fungalcofe opened this issue Mar 16, 2021 · 7 comments

Comments

@fungalcofe
Copy link

Hi,

I'd really like to have the Docker registry enable on GitLab (built-in feature).
Can it be enabled?
Thanks :-)

Admin documentation

@kay0u
Copy link
Member

kay0u commented Mar 19, 2021

Hi!

You can enable it if you want, choose the settings you want in the file /etc/gitlab/gitlab.rb and put them in /etc/gitlab/gitlab-persistent.rb (/etc/gitlab/gitlab.rb will be overwritten on each upgrade)

@fungalcofe
Copy link
Author

I'm back, sorry for the delay.

That was really simple to add, thank you about the gitlab-persistent.rb to avoid me stressful post updates ^^'
Here is how I did to enable it (under the same domain as the gitlab, to not deal with additional TLS config management etc.):

# /etc/gitlab/gitlab-persistent.rb
registry_external_url 'https://git.example.com:5050'
registry_nginx['ssl_certificate'] = "/etc/ssl/private/yunohost_crt.pem"
registry_nginx['ssl_certificate_key'] = "/etc/ssl/private/yunohost_key.pem"

# Then
sudo gitlab-ctl reconfigure

And don't forget to open the port 5050 in the Yunohost admin UI.

I think it would be a great value to enable it by default.

@kay0u
Copy link
Member

kay0u commented May 15, 2021

I think it could be an option at the installation of gitlab 👍

@Cornoualis
Copy link

Hi,

I followed the instructions and successfully configured the Docker registry on Gitlab, but I have an issue:
The login works properly, but the image push doesn't work:

PS C:\Users\admin\Dev\> docker push docker.mydomain.net/infra/docker-images
Using default tag: latest
The push refers to repository [docker.mydomain.net/infra/docker-images]
cc2447e1835a: Retrying in 1 second
received unexpected HTTP status: 200 OK

I guess it's a port issue, but I can't find what's wrong. Did you also have issues with it?

@fungalcofe
Copy link
Author

have you opened the port 5000 in yunohost firewall?
AFAIR that's the default port port pushing/pulling images.

@Cornoualis
Copy link

I did, but it behaves the same.
I tried to capture the traffic with Wireshark, and it seems that my computer is trying to send data on port 443.

I'm sure that there is some kind of mess in the I did, but it behaves the same.
nginx configs (there is one from Yunohost and one from Gitlab).

When you use your registry, do you specify the port (docker login/push mydomain:5050)?

@Cornoualis
Copy link

I even tried to completely disable the firewall, but it stil doesn't work.

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

No branches or pull requests

3 participants