无法从存储库下载Docker镜像

Pen*_*nsu 15 docker ubuntu-14.04 dockerhub

我正在尝试在笔记本电脑上创建一个swarm设置.我在笔记本电脑上运行swarm守护程序,并运行2个Ubuntu 14.04 VM作为docker节点.在其中一个节点上,我能够运行swarm,我可以连接到swarm守护进程.我可以列出具有docker info的节点并在其上生成一个容器.但是当我尝试在另一个VM节点上提取swarm图像时,我收到以下错误:

pensu@pensu-virtual-machine:~$ sudo docker pull swarm
Pulling repository swarm
FATA[0025] Get https://index.docker.io/v1/repositories/library/swarm/images: dial tcp: lookup index.docker.io on 127.0.1.1:53: read udp 127.0.1.1:53: i/o timeout 
Run Code Online (Sandbox Code Playgroud)

我检查过,有人说这是代理问题.但我没有使用任何代理服务器.以下是其他相关信息:

pensu@pensu-virtual-machine:~$ sudo docker version
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef
Run Code Online (Sandbox Code Playgroud)

这是我的/ etc/default/docker:

pensu@pensu-virtual-machine:~$ cat /etc/default/docker 
# Docker Upstart and SysVinit configuration file

# Customize location of Docker binary (especially for development testing).
#DOCKER="/usr/local/bin/docker"

# Use DOCKER_OPTS to modify the daemon startup options.
#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"

# If you need Docker to use an HTTP proxy, it can also be specified here.
#export http_proxy="http://127.0.0.1:3128/"

# This is also a handy place to tweak where Docker's temporary files go.
#export TMPDIR="/mnt/bigdrive/docker-tmp"
Run Code Online (Sandbox Code Playgroud)

关于我做错了什么的任何想法?

更新:这是不同的.我在家里尝试这一切.今天早上我来到办公室,登录并瞧,我能够拉出图像!

不知道是什么原因,但看起来我需要来办公室拉码头图片!

小智 17

只需停止并重新启动docker主机即可:

boot2docker stop
boot2docker start
Run Code Online (Sandbox Code Playgroud)

致记:https://forums.docker.com/t/pulling-docker-images-io-timeout/740/6


Syn*_*sso 8

更新为现代:

docker-machine stop default
docker-machine start default
Run Code Online (Sandbox Code Playgroud)

(docker-machine restart default不解决它).


小智 3

此错误消息:

  • 在 127.0.1.1:53 上查找 index.docker.io:读取 udp 127.0.1.1:53:i/o 超时

告诉本地 DNS 服务器 (127.0.1.1:53) 的连接因超时而结束。

我猜这个问题与虚拟机上的网络/dns 配置有关。