docker pull lookup index.docker.io:没有这样的主机 [英] docker pull lookup index.docker.io: no such host

查看:1216
本文介绍了docker pull lookup index.docker.io:没有这样的主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用命令

  docker pull centos:7 $ b $下载Docker quickstart terminal中的centos图像b  

结果

 拉存储库docker.io/library/centos 
拖动映像时出错:获取https://index.docker.io/v1/repositories/library/centos/images:拨号tcp:lookup index.docker.io :没有这样的主机

我使用

Docker版本1.9.1,构建a34a1d5



更新



这看起来像DNS的可见问题Docker快速启动终端

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

*** UnKnown niemożeodnaleźćindex.docker.io:服务器没有响应


解决方案

这通常是一个代理问题:如果您使用代理访问互联网,请确保:




  • 正确设置您的HTTP(S)_PROXY环境变量

  • 或使用docker-machine create使用正确的--engine-env选项



例如,在我的Windows上,使用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

这将创建正确的/ var / lib / boot2docker /配置文件设置文件,其中声明了这些变量,允许docker守护程序访问互联网。



快速启动终端默认打开ssh会话到默认VM。

这与 docker-machine ssh default 相同。

如果默认 VM未命中正确的码头工程师你可以 docker-machine rm 它,并重新创建它,这次使用 - engine-env 。 / p>

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

解决方案

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.

这篇关于docker pull lookup index.docker.io:没有这样的主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆