-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dockerBuild does not pull base image behind corporate proxy #1403
Comments
Hi @fjakop, Can you post the result of Lastly, can you also try setting the proxy properties on the command line to see if it works? Like |
|
Specifying both |
@fjakop I think the following will work. You need to specify <proxies>
<proxy>
<id>for-https-proxying</id> <!-- Make sure you use different IDs -->
<!-- For HTTPS proxying. AFAIK, the Maven doc is wrong about this. -->
<protocol>https</protocol>
<host>172.x.x.x</host>
<nonProxyHosts>localhost|srv-abc|*.int</nonProxyHosts>
</proxy>
<proxy>
<id>for-http-proxying</id>
<protocol>http</protocol> <!-- for HTTP proxying -->
<host>172.x.x.x</host>
<nonProxyHosts>localhost|srv-abc|*.int</nonProxyHosts>
</proxy>
</proxies> |
The Maven settings.xml doc suggests the default for an absent protocol is for |
I will have to double check, but probably we are getting the default value ( However, in this issue (and in most usual cases I think) the UPDATED: confirmed. Jib gets |
@fjakop just in case, add different |
Yeah, definitely add different |
@fjakop how exactly did you |
https://docs.oracle.com/javase/8/docs/api/java/net/doc-files/net-properties.html @SlimenTN like |
I found this older issue, because I had the same problem as @fjakop . I think the advice/solution to add an According to https://maven.apache.org/settings.html#proxies the When I add an additional So I think jib should not ignore a proxy entry with A workaround which worked for me was setting UPDATE: just found #3796 ... better to follow-up there. Sorry for the noise. |
Take a look at this: |
Description of the issue:
A
dockerBuild
fails on Windows 10 behind a corporate proxy. The docker registry can not be reached.Expected behavior:
The maven build should pull the base image and use the proxy settings in
settings.xml
Steps to reproduce:
~/.m2/settings.xml
** pom.xml (no deps, no build etc.)
** one java class with main method in
src/main/java
** build image with
mvn clean compile -Dimage=dockertest:0.0.1 com.google.cloud.tools:jib-maven-plugin:1.0.0-rc1:dockerBuild
Environment:
Windows 10
java -version
docker info
mvn -version
Log output:
Additional Information:
docker pull
,docker push
)The text was updated successfully, but these errors were encountered: