Skip to content

Commit a2b2b42

Browse files
authored
Merge pull request #321 from ThoughtWorks-SEA/multi-arch-images
Build multi-arch images when running official build
2 parents 8da2ae1 + 9d288d3 commit a2b2b42

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

build.gradle.kts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,11 @@ jib {
257257
image = "eclipse-temurin:${depVersions["javaMajor"]}-jre"
258258
platforms {
259259
platform {
260-
architecture = if (System.getProperty("os.arch").equals("aarch64")) "arm64" else "amd64"
260+
architecture = "amd64"
261+
os = "linux"
262+
}
263+
platform {
264+
architecture = "arm64"
261265
os = "linux"
262266
}
263267
}
@@ -288,6 +292,14 @@ tasks.jib.configure {
288292
// use different naming when building locally, to avoid confusion
289293
tasks.jibDockerBuild.configure {
290294
jib {
295+
from {
296+
platforms {
297+
platform {
298+
architecture = if (System.getProperty("os.arch").equals("aarch64")) "arm64" else "amd64"
299+
os = "linux"
300+
}
301+
}
302+
}
291303
to {
292304
image = containerRepoName
293305
}

0 commit comments

Comments
 (0)