gitlab_ynh icon indicating copy to clipboard operation
gitlab_ynh copied to clipboard

Enable Docker Registry

Open fungalcofe opened this issue 4 years ago • 7 comments

Hi,

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

Admin documentation

fungalcofe avatar Mar 16 '21 17:03 fungalcofe

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)

kay0u avatar Mar 19 '21 16:03 kay0u

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.

fungalcofe avatar Apr 08 '21 20:04 fungalcofe

I think it could be an option at the installation of gitlab :+1:

kay0u avatar May 15 '21 09:05 kay0u

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?

Cornoualis avatar Oct 13 '23 08:10 Cornoualis

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

fungalcofe avatar Oct 17 '23 17:10 fungalcofe

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 avatar Oct 20 '23 07:10 Cornoualis

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

Cornoualis avatar Oct 20 '23 07:10 Cornoualis