Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos 如何修复Docker';s";拉取图像时出错…重定向太多“;从注册表中提取图像时失败?_Macos_Docker_Coreos - Fatal编程技术网

Macos 如何修复Docker';s";拉取图像时出错…重定向太多“;从注册表中提取图像时失败?

Macos 如何修复Docker';s";拉取图像时出错…重定向太多“;从注册表中提取图像时失败?,macos,docker,coreos,Macos,Docker,Coreos,我通过CoreOS和Vagrant在OSX10.10上运行Docker 当我在CoreOS中运行docker pull ubuntu时,我遇到了以下错误: $ docker pull ubuntu Pulling repository ubuntu cc0067db4f11: Error pulling image (precise) from ubuntu, endpoint: https://cdn-registry-1.docker.io/v1/, Get https://cdn-regi

我通过CoreOS和Vagrant在OSX10.10上运行Docker

当我在CoreOS中运行
docker pull ubuntu
时,我遇到了以下错误:

$ docker pull ubuntu
Pulling repository ubuntu
cc0067db4f11: Error pulling image (precise) from ubuntu, endpoint: https://cdn-registry-1.docker.io/v1/, Get https://cdn-registry-1.docker.io/v1/images/cc0067db4f11198ef6fd0435f96a973e559b1cebfceb2bc8e4fe527b32045c2f/ancestry: dial tcp: lookup cdn-registry-1.dcc0067db4f11: Error pulling image (precise) from ubuntu, Get https://cdn-registry-1.docker.io/v1/images/cc0067db4f11198ef6fd0435f96a973e559b1cebfceb2bc8e4fe527b32045c2f/ancestry: dial tcp: lookup cdn-registry-1.docker.io on [10.0.2.3]:53: too many redirects 
6006e6343fad: Error pulling image (quantal) from ubuntu, endpoint: https://cdn-registry-1.docker.io/v1/, Get https://cdn-registry-1.docker.io/v1/images/6006e6343fadaaeb5dd98436a3cd17eac8c03cabca1ed4c8778d039e72ebcc9c/ancestry: dial tcp: lookup cdn-registry-1.d6006e6343fad: Error pulling image (quantal) from ubuntu, Get https://cdn-registry-1.docker.io/v1/images/6006e6343fadaaeb5dd98436a3cd17eac8c03cabca1ed4c8778d039e72ebcc9c/ancestry: dial tcp: lookup cdn-registry-1.docker.io on [10.0.2.3]:53: too many redirects 
7656cbf56a8c: Error pulling image (13.04) from ubuntu, endpoint: https://cdn-registry-1.docker.io/v1/, Get https://cdn-registry-1.docker.io/v1/images/7656cbf56a8c831de71ef43809b04fcf8125e7b039250835b6c5f6f280daf12e/ancestry: dial tcp: lookup cdn-registry-1.doc7656cbf56a8c: Error pulling image (13.04) from ubuntu, Get https://cdn-registry-1.docker.io/v1/images/7656cbf56a8c831de71ef43809b04fcf8125e7b039250835b6c5f6f280daf12e/ancestry: dial tcp: lookup cdn-registry-1.docker.io on [10.0.2.3]:53: too many redirects 
3db9c44f4520: Error pulling image (lucid) from ubuntu, endpoint: https://cdn-registry-1.docker.io/v1/, Get https://cdn-registry-1.docker.io/v1/images/3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710/ancestry: dial tcp: lookup cdn-registry-1.doc3db9c44f4520: Error pulling image (lucid) from ubuntu, Get https://cdn-registry-1.docker.io/v1/images/3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710/ancestry: dial tcp: lookup cdn-registry-1.docker.io on [10.0.2.3]:53: too many redirects 
5cf8fd909c6c: Error pulling image (trusty) from ubuntu, endpoint: https://cdn-registry-1.docker.io/v1/, Get https://cdn-registry-1.docker.io/v1/images/5cf8fd909c6ccc61199df6dbeb165767b83c23842ef49ca3ef3b81ece1bdce4f/ancestry: dial tcp: lookup cdn-registry-1.do5cf8fd909c6c: Error pulling image (trusty) from ubuntu, Get https://cdn-registry-1.docker.io/v1/images/5cf8fd909c6ccc61199df6dbeb165767b83c23842ef49ca3ef3b81ece1bdce4f/ancestry: dial tcp: lookup cdn-registry-1.docker.io on [10.0.2.3]:53: too many redirects 
d2099a5ba6c5: Error pulling image (saucy) from ubuntu, endpoint: https://cdn-registry-1.docker.io/v1/, Get https://cdn-registry-1.docker.io/v1/images/d2099a5ba6c5a0f94f84162d69b4cb79b47c7ea1768550c6cee55a7ba2dc3647/ancestry: dial tcp: lookup cdn-registry-1.docd2099a5ba6c5: Error pulling image (saucy) from ubuntu, Get https://cdn-registry-1.docker.io/v1/images/d2099a5ba6c5a0f94f84162d69b4cb79b47c7ea1768550c6cee55a7ba2dc3647/ancestry: dial tcp: lookup cdn-registry-1.docker.io on [10.0.2.3]:53: too many redirects 
2014/06/05 12:17:11 Could not find repository on any of the indexed registries.

如果有人能就如何解决这个问题给我一个有用的建议,我将不胜感激。

我不知道OS X,但在linux上,由于主机上的“bad”/etc/resolv.conf,这可能会发生。例如,ubuntu提供了如下内容:

nameserver 127.0.1.1
然后通过一些服务处理DNS请求。问题是,这可以从图像内部访问

要解决此问题,我必须添加一些外部名称服务器,如:

nameserver 127.0.1.1
nameserver 8.8.8.8
nameserver 8.8.4.4

尝试以下临时解决方法:

osx$ boot2docker up
osx$ boot2docker ssh
docker@boot2docker$ sudo echo "nameserver 8.8.8.8" > /etc/resolv.conf
docker@boot2docker$ sudo /etc/init.d/docker restart

它一直工作到重新启动。

我在尝试使用以下命令从docker存储库中提取容器时遇到类似问题:
docker pull ubuntu

请注意,我在virtualbox中使用coreos,并使用Nat作为网络配置来访问internet。在使用virtualbox切换网络模式时,我无法执行任何拉操作

我通过使用systemctl重新启动docker解决了这个问题,方法是使用以下命令:
sudo systemctl重启docker

然后我的拉很好。我希望这个解决方案对你有帮助。我是从CoreOS的一位创作者(Brandon Philips)通过以下链接从google group issue获得的:
10.0.2.3
是virtualbox dns服务器,请检查

您可以按照其他建议使用
8.8.8.8
,这是google dns服务器

# /etc/resolve.conf
nameserver 8.8.8.8
如果您在intranet中工作,则将其替换为普通dns服务器,您可以添加
搜索
,如下所示

# /etc/resolve.conf
nameserver xxx.xxxx.xxx
search company.com

这将有助于在MacOSX上访问您的私人回购协议,如果您使用Docker Machine,您可以尝试:

 docker-machine ls
 docker-machine ssh YOUR_VM_NAME
然后从虚拟机内部: 终止/usr/local/bin/docker进程并手动重新启动:

 sudo /usr/local/bin/docker -d -D -g /var/lib/docker -H unix:// -H tcp://0.0.0.0:2376 --label provider=virtualbox --tlsverify --tlscacert=/var/lib/boot2docker/ca.pem --tlscert=/var/lib/boot2docker/server.pem --tlskey=/var/lib/boot2docker/server-key.pem -s aufs
有趣的是,像这样重新启动

sudo /etc/init.d/docker restart

没有帮助。

在windows上,我可以通过执行以下操作来修复它:

  • 转到虚拟盒应用程序
  • 删除已创建的VM
  • 重新启动计算机(我想是可选的)
  • 开始风筝表演
  • 回到虚拟盒子,热播节目
  • 确保ping google.com命令有效

  • 现在我可以从hub下载docker图像了。

    我也这么认为,但事实似乎并非如此,更改resolve.conf没有任何帮助。你使用什么工具来挖掘请求重定向/反弹的更多细节?我是docker的新手,所以我主要使用google:)在我的例子中,容器解析archive.ubuntu.com(或类似的)失败,但从主机解析很好。因此,我查看了容器中的/etc/resolv.conf,并看到了我在回答中所描述的内容。我向Virtualbox提交了一份错误报告:一份简短的解释,说明了为什么这会有助于解决问题。这个回答没有说明最初的问题涉及不同的Linux发行版。@SidBurn等人,这是通过使用Google的公共DNS来实现的(8.8.8.8)将域名解析为IP地址。boot2docker在默认情况下尝试使用的名称服务器出现问题。此答案与boot2docker想要使用的名称服务器被破坏的原因无关;它通过使用有效的DNS解决了问题。适用于coreos with Vagrant tooWorks,如果您使用的是
    docker machine
    ,just将上面的
    boot2docker
    替换为
    docker机器
    sudo services docker.io restart
    帮助我解决
    无法在任何索引注册表上找到存储库。
    在Ubuntu 14.04上对我来说,简单地停止并重新启动docker机器似乎有帮助。