No such host for registry with a custom hostname

Expected behavior

I can run docker pull myregistry.com/image_name to pull my images

Actual behavior

I got this:

Pulling repository myregistry.com/image_name
Error while pulling image: Get http://myregistry.com/v1/repositories/image_name/images: dial tcp: lookup myregistry.com on 192.168.65.1:53: no such host

Information

$ pinata diagnose -u:
OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.11.0-beta8.2
Running diagnostic tests:
[OK]      docker-cli
[OK]      Moby booted
[OK]      driver.amd64-linux
[OK]      vmnetd
[OK]      osxfs
[OK]      db
[OK]      slirp
[OK]      menubar
[OK]      environment
[OK]      Docker
[OK]      VT-x
Docker logs are being collected into /tmp/20160425-233816.tar.gz
Most specific failure is: No error was detected
Your unique id is: 6C310BD6-2EF0-4606-ABCE-AF8BAB05D326
Please quote this in all correspondence.
$ pinata get daemon:
{"storage-driver":"aufs","debug":true,"insecure-registries":["myregistry.com"]}

Steps to reproduce the behavior

  1. Open the VPN of my company, which I need to connect to the registry. The ip of the registry is like 172.31.12.34
  2. Set insecure-registries as How to run a insecure-registry
  3. docker pull myregistry.com/image_name

Any idea?

2 Likes

@tony612 What do you get if you try to curl the registry from within a container?
Something like:
docker run --rm alpine sh -c "apk add --update curl && curl http://172.31.12.34:5000/v2/"

@frenchben {}%

btw, I removed :5000 because we use port 80

Has this issue been resolved, because I am still facing it with my private v1 registry.

I am using the latest stable version of docker on mac and I still get the following error:

dial tcp: lookup private.registry on 192.168.65.1:53: no such host

Also, I did the curl test with alpine and that gave me could not resolve host error:

Couldn't resolve host 'private.registry'