docker-registry-browser: Cannot resolve DNS hostname of registry from docker-registry-browser

I’m having to use hard-coded IP address of my docker registry as the FQDN seems to cause issues with this container.

Registry URL: https://registry.myhost.local:5001

When browsing the docker-registry-browser the front page loads fine and lists all my images, however upon clicking the image, the page errors, and the following is shown in the logs:

F, [2017-12-21T00:16:21.047264 #7] FATAL -- : [2f75f589-a26a-4ae1-87b0-85442b7b0d88]
F, [2017-12-21T00:16:21.047315 #7] FATAL -- : [2f75f589-a26a-4ae1-87b0-85442b7b0d88] Faraday::ConnectionFailed (Failed to open TCP connection to registry.myhost.local:5001 (getaddrinfo: Name does not resolve)):
F, [2017-12-21T00:16:21.047356 #7] FATAL -- : [2f75f589-a26a-4ae1-87b0-85442b7b0d88]
F, [2017-12-21T00:16:21.047483 #7] FATAL -- : [2f75f589-a26a-4ae1-87b0-85442b7b0d88] app/models/repository.rb:7:in `list'
  • The docker host can resolve the address fine from command line.
  • The container itself must be able to resolve since the initial page loaded my images fine, it’s only after clicking on an image name to browse it is when it fails.
  • From WITHIN the container, a ping is successful:
/app # ping registry.myhost.local
PING registry.myhost.local (10.1.5.22): 56 data bytes
64 bytes from 10.1.5.22: seq=0 ttl=64 time=0.049 ms

The error on the web page just states: We’re sorry, but something went wrong. If you are the application owner check the logs for more information.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 20 (9 by maintainers)

Most upvoted comments

hi guys - ive had the same problem. I had my registry resolved as registry.gecko-is.co.uk:5000:[IP] but the registry browser could not resolve this. To fix it, i made sure the registry-browser was on the same overlay network, and used the docker-registry’s internal ip address [10.x.x.x]:5000 as docker-registry-browser DOCKER_REGISTRY_URL param. Hope this helps someone else.