'Running Omnibus Gitlab in Docker with Container Registry

I'm running gitlab on docker with a relative url my.domain.com/gitlab/. I have a nginx reverse proxy which passes the requests. Everything seems to be working fine apart from the existing registry. I've set gitlab_rails['registry_enabled'] = true and added some configuration for nginx but I can't get it running. Are there any settings I'm missing?

gitlab.rb

registry_nginx['enable'] = true
registry__nginx['proxy_set_headers'] = {
  "Host" => "$http_host",
  "X-Real-IP" => "$remote_addr",
  "X-Forwared-For" => "$proxy_add_x_forwared_for",
  "X-Forwared-Ssl" => "on"
}
registry_nginx['listen_port'] = 5050

nginx.conf

  location /gitlab/ {
    root /home/git/gitlab/public;

    proxy_http_version 1.1;
    proxy_pass http://<server.ip.address>:8929/gitlab/;

    gzip                    off;

    proxy_read_timeout      300;
    proxy_connect_timeout   300;
    proxy_redirect          off;


    proxy_set_header    Host                $host;
    proxy_set_header    X-Real-IP           $remote_addr;
    proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;
    proxy_set_header    X-Forwarded-Proto   https;
    proxy_set_header    X-Forwarded-Ssl     on;
  }

docker-compose gitlab

version: '3.6'
services:
  git:
    image: gitlab/gitlab-ce:14.10.0-ce.0
    restart: unless-stopped
    container_name: gitlab
    hostname: 'my.domain.com'
    environment:
      GITLAB_OMNIBUS_CONFIG: |
         gitlab_rails['gitlab_shell_ssh_port'] = 2224
         gitlab_rails['registry_enabled'] = true
         external_url 'http://<server.ip.address>:8929/gitlab/'
    ports:
      - "8929:8929"
      - "2224:2224"
      - "5050:5050"
    shm_size: '256m'


Solution 1:[1]

I can't comment on your Nginx configuration, however, there's docs that might point you in the right direction to install with a relative URL: Configure a relative URL for GitLab.

Regarding your Registry, if you're seeing image push errors, try enabling this in your gitlab.rb and run a reconfigure afterwards:

registry['env'] = {
  "REGISTRY_HTTP_RELATIVEURLS" => true
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 dcoy