admin管理员组

文章数量:1352810

I use Quarkus 3.15.4 and Gitea action pipeline to build a docker image wit Jib. Jib build a wrong insecure repository URL.

This is my maven build:

mvn install -Pdev -DskipTests=true -DsendCredentialsOverHttp=true
-Dquarkus.application.version=${{gitea.ref_name}} 
-Dquarkus.container-image.build=true 
-Dquarkus.container-image.name=docker/user-rest 
-Dquarkus.container-image.tag=${{gitea.ref_name}} 
-Dquarkus.container-image.push=true 
-Dquarkus.container-image.insecure=true 
-Dquarkus.container-image.registry=gitea.demmtop.local 
-Dquarkus.container-image.username=XXX 
-Dquarkus.container-image.password=xxxx

And this is the answer from maven build

[INFO] --- quarkus:3.15.4:build (default) @ user-rest ---
[WARNING] [io.quarkus.agroal.deployment.AgroalProcessor] The Agroal dependency is present but no JDBC datasources have been defined.
[WARNING] [io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor] Hibernate ORM is disabled because no JPA entities were found
[INFO] [io.quarkus.kubernetes.deployment.PropertyUtil] Kubernetes manifests are generated with 'The container port http' having default value '8080'. The app and manifests will get out of sync if the property 'quarkus.http.port' is changed at runtime.
[INFO] [io.quarkus.container.image.jib.deployment.JibProcessor] Starting (local) container image build for jar using jib.
[WARNING] [io.quarkus.container.image.jib.deployment.JibProcessor] Base image 'registry.access.redhat/ubi8/openjdk-21-runtime:1.20' does not use a specific image digest - build may not be reproducible
[WARNING] [io.quarkus.container.image.jib.deployment.JibProcessor] Cannot verify server at /v2/. Attempting again with no TLS verification.
[WARNING] [io.quarkus.container.image.jib.deployment.JibProcessor] Cannot verify server at /v2/token?service=container_registry&scope=repository:root/docker/user-rest:pull,push. Attempting again with no TLS verification.
[INFO] [io.quarkus.container.image.jib.deployment.JibProcessor] Using base image with digest: sha256:8beb2186d175ec9cede987a467dfa3a1a0b6e6e2db508525d95436cf3f6afbc3
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  21.635 s
[INFO] Finished at: 2025-03-31T22:58:28+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:3.15.4:build (default) on project user-rest: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR]     [error]: Build step io.quarkus.container.image.jib.deployment.JibProcessor#buildFromJar threw an exception: java.lang.RuntimeException: Unable to create container image
[ERROR]     at io.quarkus.container.image.jib.deployment.JibProcessor.containerize(JibProcessor.java:273)
[ERROR]     at io.quarkus.container.image.jib.deployment.JibProcessor.buildFromJar(JibProcessor.java:200)
[ERROR]     at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
[ERROR]     at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
[ERROR]     at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
[ERROR]     at .jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR]     at .jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
[ERROR]     at .jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
[ERROR]     at .jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
[ERROR]     at java.base/java.lang.Thread.run(Thread.java:1583)
[ERROR]     at .jboss.threads.JBossThread.run(JBossThread.java:483)
[ERROR] Caused by: com.google.cloud.tools.jib.registry.RegistryErrorException: Tried to push BLOB for gitea.demmtop.local/root/docker/user-rest with digest sha256:e156c76c7d86756efcdb1a8e08c25fb239738fc045e35a84328a87de0d18d174 but failed because: registry returned error code 404; possible causes include invalid or wrong reference. Actual error output follows:
[ERROR] Not found.
[ERROR] Caused by: com.google.api.client.http.HttpResponseException: 404 Not Found
[ERROR] POST /v2/root/docker/user-rest/blobs/uploads/
[ERROR] Not found.

The generated Gitea URL is wrong: /v2/root/docker/user-rest
The generated Gitea URL is wrong: /root/docker/user-rest
The right Gitea URL is: /docker/user-rest
I believe the wrong URL is a Sonatype Nexus Repository URL

本文标签: Quarkus Jib Build with insecure gitea repository doesn39t workStack Overflow