Gitlab-ce external docker registry configuration

Hi,

I’m trying to configure self-hosted Gitlab-CE with an external docker registry.

It works partially,

I can log in with my GitLab account to my external docker registry and in Gitlab I can see my container image that has been pushed to the external docker registry but I can’t see tags (it shows 0 tags). In logs this message appears:

2023-01-24_09:28:41.43064 time="2023-01-24T09:28:41.430Z" level=error msg="repository name not known to registry" auth_user_name= code=NAME_UNKNOWN correlation_id=01GQHHQCPN2YGHJZJNC6DNFB7A detail="map[name:root/test/testimage]" error="name unknown: repository name not known to registry" go_version=go1.17.13 root_repo=root vars_name=root/test/testimage version=v3.57.0-gitlab
2023-01-24_09:28:41.43066 {"content_type":"application/json","correlation_id":"01GQHHQCPN2YGHJZJNC6DNFB7A","duration_ms":1,"host":"127.0.0.1:5000","level":"info","method":"GET","msg":"access","proto":"HTTP/1.1","referrer":"","remote_addr":"127.0.0.1:44734","remote_ip":"127.0.0.1","status":404,"system":"http","time":"2023-01-24T09:28:41.430Z","ttfb_ms":1,"uri":"/v2/root/test/testimage/tags/list?n=10000","user_agent":"GitLab/15.5.0","written_bytes":122}

My gitlab config:

# Docker registry
gitlab_rails['registry_enabled'] = true
registry_external_url 'https://docker.myregistry.com'
gitlab_rails['registry_host'] = "docker.myregistry.com"
gitlab_rails['registry_port'] = '6443'
gitlab_rails['registry_issuer'] = "omnibus-gitlab-issuer"
gitlab_rails['registry_key_path'] = "/var/opt/gitlab/gitlab-rails/certificate.key"
#gitlab_rails['registry_api_url'] = 'https://docker.myregistry.com'

when I uncomment this line
gitlab_rails['registry_api_url'] = 'https://docker.myregistry.com'

I have a Docker connection error. I’ve tried with adding port to registry_api_url but also didn’t work.

What do I wrong? GitLab and Docker registry are set up in container.