Docker Windows 在防火墙后面的安装错误

Docker Installation Error on Windows behind Firewall

我正在尝试在 Windows 计算机上安装 Docker,但我收到此消息:

Running pre-create checks...
(default) No default Boot2Docker ISO found locally, downloading the latest release...
Error with pre-create check: "Get https://api.github.com/repos/boot2docker/boot2docker/releases/latest: dial tcp 192.30.252.124:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond."
Looks like something went wrong in step 'Checking if machine default exists'...
Press any key to continue...

关于如何解决这个问题有什么建议吗?

您可能在防火墙后面。如果是这样,您将需要配置一个 http 代理。

根据 https://github.com/boot2docker/boot2docker-cli/issues/230,您可以通过以下几种方式之一执行此操作:

(1) 编辑 start.sh 并在调用 boot2docker.exe 之前添加以下内容

export HTTP_PROXY=<proxy>
export HTTPS_PROXY=<proxy>

(2) 将 HTTP_PROXYHTTPS_PROXY(及其值)添加到 Windows 配置中的系统变量或用户变量。

代理值的格式应为http://hostname:port

编辑 start.sh 文件可能会出现其他错误。

相反,只需将您的 boot2docker.iso 放在以下位置即可。

c:\user\USERNAME\.docker\machine\cache

并重新启动您的 Docker 终端。