docker “FATA[0162] ... connection timed out" 错误改正方法

来源:互联网 发布:汽配查询软件 编辑:程序博客网 时间:2024/06/03 21:22

在ubuntu14.04下面安装docker后,运行sudo docker run hello-world,提示下面的错误,

Unable to find image 'hello-world:latest' locally
Pulling repository hello-world
FATA[0162] Get https://index.docker.io/v1/repositories/library/hello-world/images: dial tcp 162.242.195.84:443: connection timed out

连接远程的docker库出错,判断是在内网需要使用代理。参考stackoverflow的贴子,添加代理的方法如下:

1)修改/etc/default/docker文件,把其中“export http_proxy” 那段注释打开,然后把IP地址改成代理服务器地址,
# If you need Docker to use an HTTP proxy, it can also be specified here.
export http_proxy="http://192.168.1.1:8888/"

2)重启docker服务,
service docker restart

附注:stackoverflow原帖链接http://stackoverflow.com/questions/23111631/cannot-download-docker-images-behind-a-proxy



0 0
原创粉丝点击