gitlab_ynh
gitlab_ynh copied to clipboard
Enable Docker Registry
Hi,
I'd really like to have the Docker registry enable on GitLab (built-in feature). Can it be enabled? Thanks :-)
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)
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.
I think it could be an option at the installation of gitlab :+1:
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?
have you opened the port 5000 in yunohost firewall?
AFAIR that's the default port port pushing/pulling images.
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)?
I even tried to completely disable the firewall, but it stil doesn't work.