Docker: https 的 wget 不工作
Docker: wget for https does not work
在我的 docker 文件中,我有以下命令
RUN wget -o test.jar https://bintray.com/artifact/download/thesamet/maven/gerrit-saml-plugin-2.11.4-2.jar
但是在构建中我得到以下错误:
The command '/bin/sh -c wget -o test.jar https://bintray.com/artifact/download/thesamet/maven/gerrit-saml-plugin-2.11.4-2.jar' returned a non-zero code: 8
我尝试了 --no-check-certificate
和 -U
但得到了同样的错误。
manual of wget 表示 -o
指定日志消息写入的位置。这意味着选项 -o test.jar
导致错误消息被写入 test.jar
而不是 stderr。您不会在 stderr 上看到任何错误消息,也不会将文件下载到 test.jar
.
以下命令适用于我的电脑,如果出现任何错误,您现在应该会看到一条消息:
wget -O test.jar https://bintray.com/artifact/download/thesamet/maven/gerrit-saml-plugin-2.11.4-2.jar
以下命令有效。我应该使用 ADD
ADD https://bintray.com/artifact/download/thesamet/maven/gerrit-saml-plugin-2.11.4-2.jar .
有时是代理问题。
我们通过以下方式解决了代理问题:
wget --no-check-certificate -e use_proxy=yes -e http_proxy=YOURPROXY http://... ...
在我的 docker 文件中,我有以下命令
RUN wget -o test.jar https://bintray.com/artifact/download/thesamet/maven/gerrit-saml-plugin-2.11.4-2.jar
但是在构建中我得到以下错误:
The command '/bin/sh -c wget -o test.jar https://bintray.com/artifact/download/thesamet/maven/gerrit-saml-plugin-2.11.4-2.jar' returned a non-zero code: 8
我尝试了 --no-check-certificate
和 -U
但得到了同样的错误。
manual of wget 表示 -o
指定日志消息写入的位置。这意味着选项 -o test.jar
导致错误消息被写入 test.jar
而不是 stderr。您不会在 stderr 上看到任何错误消息,也不会将文件下载到 test.jar
.
以下命令适用于我的电脑,如果出现任何错误,您现在应该会看到一条消息:
wget -O test.jar https://bintray.com/artifact/download/thesamet/maven/gerrit-saml-plugin-2.11.4-2.jar
以下命令有效。我应该使用 ADD
ADD https://bintray.com/artifact/download/thesamet/maven/gerrit-saml-plugin-2.11.4-2.jar .
有时是代理问题。
我们通过以下方式解决了代理问题:
wget --no-check-certificate -e use_proxy=yes -e http_proxy=YOURPROXY http://... ...