Error message Unknown host gcr.io
See original GitHub issueDescription of the issue:
I’m trying to use jib
in a maven project. However, during building with jib:dockerBuild
, I get the error message Build to Docker daemon failed, perhaps you should make sure that the registry you configured exists/is spelled properly: Unknown host gcr.io
. This is usually a sign for a program not using our corporate proxy, but maven is configured to use the proxy and can download the plugin just fine.
Expected behavior:
Have the build work when running mvn jib:dockerBuild
.
Steps to reproduce:
Run mvn jib:dockerBuild
. I assume a corporate proxy is involved in the error.
Environment:
- Windows 7
- Maven 3.3.9
jib-maven-plugin
Configuration:
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>0.9.2</version>
<configuration>
<to>
<image>phycus</image>
</to>
</configuration>
</plugin>
Log output:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building service-haplotype-frequency-curation 0.0.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- jib-maven-plugin:0.9.2:dockerBuild (default-cli) @ service-haplotype-frequency-curation ---
[WARNING] Base image 'gcr.io/distroless/java' does not use a specific image digest - build may not be reproducible
[INFO]
[INFO] Containerizing application to Docker daemon as phycus...
[INFO]
[INFO] Getting base image gcr.io/distroless/java...
[INFO] Building dependencies layer...
[INFO] Building resources layer...
[INFO] Building classes layer...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.368 s
[INFO] Finished at: 2018-07-10T15:42:26+02:00
[INFO] Final Memory: 21M/264M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:0.9.2:dockerBuild (default-cli) on project service-haplotype-frequency-curation: Build to Docker daemon failed, perhaps you should make sure that the registry you configured exists/is spelled properly: Unknown host gcr.io -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (11 by maintainers)
Top Results From Across the Web
Troubleshooting | Container Registry documentation
ERROR : (gcloud.docker) A Docker command did not run successfully. Tried to run: 'docker push gcr.io/container-engine-docs/example' Exit code: 1.
Read more >Ask Question - Stack Overflow
ERROR- Get "https://gcr.io/v2/": x509: certificate signed by unknown authority. I am using it on windows,. I tried by two ways-. 1 Placing file ......
Read more >Kubernetes Troubleshooting - Fixing ImagePullBackOff State ...
The ImagePullBackOff is an error state that occurs when a Pod startup fails due to an inability to pull the image. The state...
Read more >Troubleshooting - NGINX Ingress Controller - Kubernetes
One possible reason for this error is lack of permission to bind to the port. Ports 80, 443, and any other port <...
Read more >Troubleshooting - Harness.io Docs
Most often, Delegate errors are the result of Delegate setup issues. Ensure you are familiar with how the Delegate and Harness Manager ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not sure, but I guess we can add proxy support? https://maven.apache.org/guides/mini/guide-proxies.html
That is, read the proxy settings Maven is using and set it properly with our connection factory.
@fscheel also, can you try the following properties on mvn execution to see if the workaround works?
https://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html
For example,
mvn -Dhttps.proxyHost=... -Dhttps.proxyPort-... -Dhttp.proxyHost=... -Dhttp.proxyPort=...
Sometimes it seems possible to use
http(s).proxyUser
andhttp(s).proxyPassword
if the server requires auth.