You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Building an image with the container-jib extension fails, if the base image is hosted in a public registry and the properties quarkus.container-image.username and quarkus.container-image.password are set to push on a different private registry.
Expected behavior
Build image from the public registry, and push the image to a different private registry.
Actual behavior
20695 [ERROR] Caused by: com.google.cloud.tools.jib.api.RegistryAuthenticationFailedException: Failed to authenticate with registry registry-1.docker.io/azul/zulu-openjdk because: 401 Unauthorized
20695 [ERROR] {"details":"incorrect username or password"}
20695 [ERROR]
20695 [ERROR] at com.google.cloud.tools.jib.registry.RegistryAuthenticator.authenticate(RegistryAuthenticator.java:306)
20695 [ERROR] at com.google.cloud.tools.jib.registry.RegistryAuthenticator.authenticate(RegistryAuthenticator.java:258)
20696 [ERROR] at com.google.cloud.tools.jib.registry.RegistryAuthenticator.authenticatePull(RegistryAuthenticator.java:177)
20696 [ERROR] at com.google.cloud.tools.jib.registry.RegistryClient.doBearerAuth(RegistryClient.java:362)
20696 [ERROR] at com.google.cloud.tools.jib.registry.RegistryClient.doPullBearerAuth(RegistryClient.java:327)
20696 [ERROR] at com.google.cloud.tools.jib.builder.steps.PullBaseImageStep.call(PullBaseImageStep.java:158)
20696 [ERROR] at com.google.cloud.tools.jib.builder.steps.PullBaseImageStep.call(PullBaseImageStep.java:56)
20697 [ERROR] at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
20697 [ERROR] at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57)
20697 [ERROR] at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
20697 [ERROR] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
20697 [ERROR] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
20698 [ERROR] at java.base/java.lang.Thread.run(Thread.java:832)
To Reproduce
Steps to reproduce the behavior:
Set quarkus.jib.base-jvm-image=docker.io/azul/zulu-openjdk:14
Set quarkus.container-image.registry=registry.gitlab.com, quarkus.container-image.group and quarkus.container-image.name.
Environment (please complete the following information):
Output of java -version: openjdk version "14" 2020-03-17
Quarkus version or git rev: 1.3.2.Final
Build tool (ie. output of mvnw --version or gradlew --version): Apache Maven 3.6.3
Additional context
The public base image is set to docker.io explicitly (it's the default if not set), the quarkus.container-image.registry is set to registry.gitlab.com, since both registries are different one approach is to detect if they are the same to authenticate using the container-image properties.
Thinking more on this, if both registries are different (both private) the best would be to provide another set of permissions (user/pass) to be used by Jib to pull and push.
Describe the bug
Building an image with the container-jib extension fails, if the base image is hosted in a public registry and the properties
quarkus.container-image.username
andquarkus.container-image.password
are set to push on a different private registry.This is a regression from quarkusio#8288.
Expected behavior
Build image from the public registry, and push the image to a different private registry.
Actual behavior
To Reproduce
Steps to reproduce the behavior:
quarkus.jib.base-jvm-image=docker.io/azul/zulu-openjdk:14
quarkus.container-image.registry=registry.gitlab.com
,quarkus.container-image.group
andquarkus.container-image.name
../mvnw package -Dquarkus.container-image.push=true -Dquarkus.container-image.username=REGISTRY_USER -Dquarkus.container-image.password=REGISTRY_PASSWORD
Configuration
Environment (please complete the following information):
java -version
: openjdk version "14" 2020-03-17mvnw --version
orgradlew --version
): Apache Maven 3.6.3Additional context
The public base image is set to
docker.io
explicitly (it's the default if not set), thequarkus.container-image.registry
is set toregistry.gitlab.com
, since both registries are different one approach is to detect if they are the same to authenticate using the container-image properties.Thinking more on this, if both registries are different (both private) the best would be to provide another set of permissions (user/pass) to be used by Jib to pull and push.
quarkusio#8498
The text was updated successfully, but these errors were encountered: