docker pull lookup index.docker.io: no such host
Asked Answered
T

1

9

I am attempting to download centos image in "Docker quickstart terminal" with command

docker pull centos:7

with result

Pulling repository docker.io/library/centos
Error while pulling image: Get https://index.docker.io/v1/repositories/library/centos/images: dial tcp: lookup index.docker.io: no such host

I use
Docker version 1.9.1, build a34a1d5

Update

This looks like a problem with the DNS visible from "Docker quickstart terminal"

$ nslookup.exe index.docker.io
Serwer:  UnKnown
Address:  2a01:1700:2:ffff::9f01

*** UnKnown nie może odnaleźć index.docker.io: No response from server
Tavi answered 30/11, 2015 at 11:8 Comment(0)
G
6

This usually is a proxy issue: if you are using a proxy to access internet, make sure to:

  • either set properly your HTTP(S)_PROXY environment variable
  • or to use docker-machine create with the right --engine-env option

For instance, on my Windows, using VirtualBox:

docker-machine create -d virtualbox \
  --engine-env HTTP_PROXY=$http_proxy --engine-env HTTPS_PROXY=$https_proxy \
  --engine-env http_proxy=$http_proxy --engine-env https_proxy=$https_proxy \
  --engine-env NO_PROXY=$no_proxy --engine-env no_proxy=$no_proxy
  aMachine

That will create the right /var/lib/boot2docker/profile setting file, with those variables declared in it, allowing docker daemon to access the internet.

The quickstart terminal opens by default an ssh session to the "default" VM.
That is the same as docker-machine ssh default.
If that default VM misses the right docker profile, you can docker-machine rm it, and recreate it, this time using --engine-env.

Gregoire answered 30/11, 2015 at 11:17 Comment(1)
i have the same problem somehow please check my post #52323915Qadi

© 2022 - 2024 — McMap. All rights reserved.