Hi使用具有Jib扩展和设置的Quarkus:quarkus.jib.base-jvm-image=azul/zulu-openjdk-alpine:11
生成失败,出现以下错误。
- 我在Mac OS X上,使用Docker桌面。
- 这似乎发生在更新Docker Desktop 之后
- 运行
sudo ./gradlew clean build --stacktrace -Dquarkus.container-image.build=true -Dquarkus.profile=dev
工作 - 与
./docker-credential-osxkeychain list
核对,列出了我的凭据。 - 也在看Docker桌面,我也登录了。
io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.container.image.jib.deployment.JibProcessor#buildFromJar threw an exception: java.lang.RuntimeException: Unable to create container image
at io.quarkus.container.image.jib.deployment.JibProcessor.containerize(JibProcessor.java:240)
at io.quarkus.container.image.jib.deployment.JibProcessor.buildFromJar(JibProcessor.java:166)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:925)
at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at java.base/java.lang.Thread.run(Thread.java:829)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: com.google.cloud.tools.jib.api.RegistryAuthenticationFailedException: Failed to authenticate with registry registry-1.docker.io/azul/zulu-openjdk-alpine because: 401 Unauthorized
GET https://auth.docker.io/token?service=registry.docker.io&scope=repository:azul/zulu-openjdk-alpine:pull
{"details":"incorrect username or password"}
at com.google.cloud.tools.jib.registry.RegistryAuthenticator.authenticate(RegistryAuthenticator.java:305)
at com.google.cloud.tools.jib.registry.RegistryAuthenticator.authenticate(RegistryAuthenticator.java:257)
at com.google.cloud.tools.jib.registry.RegistryAuthenticator.authenticatePull(RegistryAuthenticator.java:176)
at com.google.cloud.tools.jib.registry.RegistryClient.doBearerAuth(RegistryClient.java:334)
at com.google.cloud.tools.jib.registry.RegistryClient.authPullByWwwAuthenticate(RegistryClient.java:393)
at com.google.cloud.tools.jib.builder.steps.PullBaseImageStep.call(PullBaseImageStep.java:177)
at com.google.cloud.tools.jib.builder.steps.PullBaseImageStep.call(PullBaseImageStep.java:69)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.google.cloud.tools.jib.http.ResponseException: 401 Unauthorized
GET https://auth.docker.io/token?service=registry.docker.io&scope=repository:azul/zulu-openjdk-alpine:pull
{"details":"incorrect username or password"}
at com.google.cloud.tools.jib.http.FailoverHttpClient.call(FailoverHttpClient.java:355)
at com.google.cloud.tools.jib.http.FailoverHttpClient.call(FailoverHttpClient.java:266)
at com.google.cloud.tools.jib.registry.RegistryAuthenticator.authenticate(RegistryAuthenticator.java:283)
... 12 more
Caused by: com.google.api.client.http.HttpResponseException: 401 Unauthorized
GET https://auth.docker.io/token?service=registry.docker.io&scope=repository:azul/zulu-openjdk-alpine:pull
{"details":"incorrect username or password"}
at com.google.api.client.http.HttpResponseException$Builder.build(HttpResponseException.java:293)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1118)
at com.google.cloud.tools.jib.http.FailoverHttpClient.call(FailoverHttpClient.java:349)
... 14 more
不太清楚这是怎么回事。但我擦掉了我的~/.docker/docker.config
,它工作。我认为在旧的Docker Desktop上,密钥链认证必须手动设置,我猜更新使事情变得一团糟。