Docker启动与archive.ubuntu的连接

我设法将docker安装到正在使用Windows 7的计算机上。我的计算机在公司networking中。 正如我想学习docker我是按照这个指南 。 当我的Dockerfile执行时:

RUN apt-get -y update && apt-get install -y fortunes 

这是执行Ubuntu的更新和安装财富,我得到以下错误:

 cannot initiate the connection to archive.ubuntu.com:80. and - connect <101:network is unreachable> 

为了解决我的问题,首先我连接到我的虚拟机,我find/etc/resolv.conf文件,我修改它添加谷歌DNS

 namespace 8.8.8.8 

但似乎并没有解决问题,当我退出并重build我的Dockerfile。

由于我的机器是在Windows上,我还没有find这个问题的解决scheme。 有谁知道我应该如何超越这个问题?

您必须使用Windows计算机networking设置的相同名称服务器启动dockerddockerd守护程序),然后您的容器和映像才能从外部networking/ Internet获得连接。

欲了解更多详情请访问docker官方链接: https : //docs.docker.com/docker-for-windows/#network