Docker Community Forums

Share and learn in the Docker community.

No such host for registry with a custom hostname


(Tony Han) #1

Expected behavior

I can run docker pull to pull my images

Actual behavior

I got this:

Pulling repository
Error while pulling image: Get dial tcp: lookup on no such host


$ pinata diagnose -u:
OS X: version 10.11.4 (build: 15E65) 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:

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
  2. Set insecure-registries as How to run a insecure-registry
  3. docker pull

Any idea?

Docker for Mac & Host VPN DNS don't cooperate
(Frenchben) #2

@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"

(Tony Han) #3

@frenchben {}%

btw, I removed :5000 because we use port 80

(Jasonborne) #4

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 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'