symbolic name for registry
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.
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.
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.
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?
Everywhere I think. Anywhere where I would see "127.0.0.1:5000" I'd rather see the symbol "registryX".
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 ....
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.