【发布时间】:2017-11-07 04:56:05
【问题描述】:
我无法让 Docker Toolbox for Windows 10 在公司代理后面工作。
我无法让 docker login 或 docker run 工作,所以这是我为调试所做的。
我在虚拟机中创建了一个普通的 ubuntu 机器。
在我的主机上,我启动在 8000 端口上运行的简单服务器。
在ubuntu中:
$ curl 10.0.2.2:8000
$ [it retrieves the html being served]
$ curl www.google.com
$ curl (7) Failed to connect to www.google.com port 80: Connection refused
$ export http_proxy=http://my-proxy:3128
$ curl www.google.com
$ [302 HTTP response from google]
在 boot2docker 上:
$ curl 10.0.2.2:8000
$ [it retrieves the html being served]
$ curl www.google.com
$ curl (7) Failed to connect to www.google.com port 80: Connection refused
$ export http_proxy=http://my-proxy:3128
$ curl www.google.com
$ curl: (7) Failed to connect to my-proxy:3128: No route to host
这里发生了什么?
【问题讨论】:
-
@Matt - 不 -
no route to host -
你运行
$(boot2docker shellinit)了吗? (github.com/boot2docker/boot2docker/issues/… 及以下) -
@VonC - 我没有 boot2docker 作为命令行参数 - 我应该吗?
-
您应该打开一个 ssh 会话,在该会话中 boot2docker 将被识别
-
@VonC 据我所知-
docker-machine命令就足够了吗? - 是的 - 我正在运行它给我的 env 命令
标签: docker proxy virtualbox boot2docker docker-toolbox