registry-ui icon indicating copy to clipboard operation
registry-ui copied to clipboard

symbolic name for registry

Open hholst80 opened this issue 1 year ago • 6 comments

It would be nice if I can give the Registry a name instead of showing "localhost:5000" or something else which is technically the hostname of the registry, it does not tell me much which repo I am looking at.

image image

hholst80 avatar Aug 31 '24 13:08 hholst80

Actually, that's a name. Below, you see repositories and by combining hostname + repo name you get an image reference (URL) as a standard, e.g. 127.0.0.1:5000/myrepo:tag Not sure why do you need to specify 127.0.0.1:5000 if your actual registry hostname is something else.

roman-vynar avatar Oct 17 '24 09:10 roman-vynar

I am accessing it via a tunnel. But I have many registries. Knowing which registry I am looking at without investigating my VPN tunnel setup would be helpful.

hholst80 avatar Oct 20 '24 18:10 hholst80

So you want to have let's say all references in UI to hostname, e.g. 127.0.0.1:500, to be shown with a custom alias name, e.g. registryX and registryX/foobar:1.2.3 references? Everywhere in UI on each page or only breadcrumb?

roman-vynar avatar Oct 21 '24 07:10 roman-vynar

Everywhere I think. Anywhere where I would see "127.0.0.1:5000" I'd rather see the symbol "registryX".

hholst80 avatar Oct 22 '24 21:10 hholst80

I use this behind an nginx proxy in a compose file. I have to set hostname to registry:5000 and not the "real" external address, because this container has to start before nginx, and it will refuse to start if it cannot access the registry.

So nginx needs registry-ui for the tunnel, and registry-ui needs nginx to use the proper address to check the registry ....

LeviticusMB avatar Mar 07 '25 11:03 LeviticusMB

How about setting a custom DNS pointing to localhost like this:

- name: Create registry-ui container
  docker_container:
    name: registry-ui
    labels: {"name": "registry-ui"}
    image: "{{registry_domain}}/registry-ui:{{registry_ui_version}}"
    command: "-config-file /configs/config.yml"
    state: started
    restart_policy: always
    read_only: True
    network_mode: host
    volumes:
      - /opt/registry-ui:/configs:ro
      - /etc/nsswitch.conf:/etc/nsswitch.conf:ro
    etc_hosts:
      docker.mydomain.com: 127.0.0.1

and then you may try to use docker.mydomain.com as registry.hostname in the config file? It will show docker.mydomain.com in UI everywhere but effectively it will be still 127.0.0.1 where you're tunneling to.

roman-vynar avatar Jun 11 '25 12:06 roman-vynar