I’m trying to enable a container registry on my dockerized Gitlab install according to these instructions.
I’m also exposing my install on different ports, and using an nginx reverse-proxy to successfully route (https) traffic to the regular GitLab instance with the following
docker-compose command (again, an external nginx reverse-proxy listens, e.g. on port
443 and proxies to
sudo docker run --detach \ --hostname gitlab.myexample.org \ --publish 8443:443 --publish 8080:80 --publish 2222:22 \ --name gitlab \ --restart always \ --volume /srv/gitlab/config:/etc/gitlab \ --volume /srv/gitlab/logs:/var/log/gitlab \ --volume /srv/gitlab/data:/var/opt/gitlab \ gitlab/gitlab-ce:latest
I’ve been stuck on enabling the Container Registry, however. I can’t seem to get the right incantation for directing SSL-terminated traffic from my nginx reverse-proxy to the docker container that is exposing the registry service on (what I believe to be port
I keep on getting 502 errors at my reverse-proxy, since there seem to be SSL handshake errors when communicating with the registry host, or I’m trying to connect to the wrong GitLab registry host/port altogether.
Some posts on SO mention that
registry_http_addr must be set with a specific IP and host (instead of just
localhost), but I’m fairly sure I’m confused as to what IP and port that should be.
Here are some of my current relevant settings from
registry_external_url 'https://gitlab.myexample.org:5005' # the port that the nginx reverse-proxy listens to gitlab_rails['registry_enabled'] = true gitlab_rails['registry_host'] = "gitlab.myexample.org" registry['enable'] = true # registry['registry_http_addr'] = "localhost:5000" # untouched, for now?
The above is in addition to exposing
--port 5005:5000 (in the
docker-compose command above) as well.
Any direction is much appreciated!