GoogleContainerTools / jib

🏗 Build container images for your Java applications.
Apache License 2.0
13.6k stars 1.43k forks source link

Credentials Error in Combination with Mac Apple Silicon + Java 21 + Gradle #4116

Closed goafabric closed 10 months ago

goafabric commented 12 months ago

Environment:

Description of the issue:

With the combination of Mac Apple Silicon + Java21 + Gradle, Deployment to Dockerhub suddenly breaks with

"com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException: Build image failed, perhaps you should make sure your credentials for 'registry-1.docker.io/goafabric/callee-service' are set up correctly"

With Java20 it correctly picks up the credentials from the docker login. Also the Jib Maven Plugin works. And Gradle Plugin on Linux Github Actions also work => seems to be an issue with the Combination of Mac, Java21 + Gradle

Also see: https://github.com/gradle/gradle/issues/26453

Expected behavior:

Deployment to Dockerhub should work

Steps to reproduce: Configuration ` val dockerRegistry = "goafabric" val baseImage = "ibm-semeru-runtimes:open-20.0.1_9-jre-focal@sha256:f1a10da50d02f51e79e3c9604ed078a39c19cd2711789cab7aa5d11071482a7e"

jib { val amd64 = com.google.cloud.tools.jib.gradle.PlatformParameters(); amd64.os = "linux"; amd64.architecture = "amd64"; val arm64 = com.google.cloud.tools.jib.gradle.PlatformParameters(); arm64.os = "linux"; arm64.architecture = "arm64" from.image = baseImage to.image = "${dockerRegistry}/${project.name}:${project.version}" container.jvmFlags = listOf("-Xms256m", "-Xmx256m") from.platforms.set(listOf(amd64, arm64)) } ` Log output: com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException: Build image failed, perhaps you should make sure your credentials for 'registry-1.docker.io/goafabric/callee-service' are set up correctly. See https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#what-should-i-do-when-the-registry-responds-with-unauthorized for help

blakeli0 commented 10 months ago

This does not seem like a Jib specific issue, closing for now. Please reopen if this issue still persist after the related Gradle issue is resolved.