GoogleContainerTools / jib

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

Jib fails in jibBuildTar Gradle task when Multiple platforms are configured. #4318

Open vct-app opened 1 month ago

vct-app commented 1 month ago

Environment:

Description of the issue: When multiple platforms are configured, Jib fails in jibBuildTar Gradle task when the build is executed in Mac arm-64.

Caused by: com.google.common.base.VerifyException: multi-platform image building not supported when building a local tar image
 at com.google.common.base.Verify.verify(Verify.java:126)
 at com.google.cloud.tools.jib.builder.steps.StepsRunner.lambda$writeTarFile$19(StepsRunner.java:644)
 at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
 at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:75)
 at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)

Below items are similar to this issue but don’t seem to be addressing this specific task: https://github.com/GoogleContainerTools/jib/pull/4249 https://github.com/GoogleContainerTools/jib/pull/4268

Expected behavior: Task should complete successfully.

Steps to reproduce:

  1. Configure multiple platforms, example: linux/amd64 and linux/arm64
  2. Execute ./gradlew jibDockerBuild