diff --git a/build.gradle.kts b/build.gradle.kts index 0deac408..75c9100d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,7 +15,7 @@ plugins { id("org.springframework.boot") version "3.2.0" id("io.spring.dependency-management") version "1.1.4" id("org.graalvm.buildtools.native") version "0.9.28" - id("com.google.cloud.tools.jib") version "3.3.2" + id("com.google.cloud.tools.jib") version "3.4.0" } repositories { @@ -104,6 +104,7 @@ tasks.register("dockerImageNativeNoTest") {group = "build"; dependsOn("bootJar") jib.from.image = "ubuntu:22.04" jib.to.image = "${dockerRegistry}/${project.name}-native" + (if (System.getProperty("os.arch").equals("aarch64")) "-arm64v8" else "") + ":${project.version}" jib.pluginExtensions { pluginExtension {properties = mapOf("imageName" to "application"); implementation = "com.google.cloud.tools.jib.gradle.extension.nativeimage.JibNativeImageExtension" }} + val platform = com.google.cloud.tools.jib.gradle.PlatformParameters(); platform.os = "linux"; platform.architecture = (if (System.getProperty("os.arch").equals("aarch64")) "arm64" else "amd64"); jib.from.platforms.set(listOf(platform)) } finalizedBy("jib") }