Docker docker 工具箱中的代理设置

Docker proxy settings in docker toolbox

我们正在使用 Windows OS 7 使用技术堆栈开发应用程序,即。 docker、spring、java8、gradle 等。我们已经在我们的机器上安装了 docker 工具箱。

现在基本图像位于我们组织的 docker 存储库中。但是 docker 无法识别主机。

我们可以从安装在 linux 机器上的 docker 连接到我们的存储库。在这种情况下,我们对这两个文件进行了更改,即

1.
/etc/systemd/system/docker.service.d/daemon.conf 
here we have added http_proxy and https_proxy.

2.
/etc/docker/daemon.json
here we have mentioned the host name as

{"insecure-registries":["<host-name>"]}

但是我们无法在 windows 的 docker 工具箱中找到这些文件 7.

请让我们知道如何解决此问题。

我们在 dockerBuildImage gradle 任务中遇到以下错误,当前无法下载基本映像。


:dockerBuildImage FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':dockerBuildImage'.
> Could not build image: Get https:<host-name>/v2/: x509: certificate signed by unknown authority

请指教

以下内容在 docker 工具箱中对我有用

更改文件 /var/lib/boot2docker/profile 以包含以下文本:

--insecure-registry=<host1-name>
export "NO_PROXY=<host-name>"
export HTTP_PROXY=<value>
export HTTPS_PROXY=<value>

然后重新启动 docker 机器以使这些更改可见。