Skip to content

Commit 2609f29

Browse files
committed
Tune OCI image creation
1 parent 9c8e255 commit 2609f29

1 file changed

Lines changed: 17 additions & 7 deletions

File tree

backend/build.gradle.kts

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,26 @@ tasks.withType<KotlinCompile> {
104104
}
105105

106106
tasks.getByName<org.springframework.boot.gradle.tasks.bundling.BootBuildImage>("bootBuildImage") {
107-
builder = "paketobuildpacks/builder-jammy-tiny:latest"
107+
builder = "bellsoft/buildpacks.builder:musl"
108108

109-
// FIXME: if you find a way to do this automatically, that would be nice :)
110-
val jlinkModules = "java.base,java.desktop,java.instrument,java.net.http,java.prefs,java.rmi,java.scripting,java.security.jgss,java.sql.rowset,jdk.compiler,jdk.jfr,jdk.management,jdk.net,jdk.unsupported,jdk.charsets"
111109
environment = mapOf(
112-
"BP_JVM_JLINK_ENABLED" to "true",
113-
"BP_JVM_JLINK_ARGS" to "--no-man-pages --no-header-files --strip-debug --compress=1 --add-modules $jlinkModules",
114-
"BPL_JVM_THREAD_COUNT" to "10",
110+
"BP_NATIVE_IMAGE" to "false",
111+
"BP_JVM_AOTCACHE_ENABLED" to "true",
112+
"BP_SPRING_AOT_ENABLED" to "false",
115113
"BP_JVM_VERSION" to "25",
116-
"BPE_APPEND_JAVA_TOOL_OPTIONS" to "-Dfile.encoding=UTF-8 -Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8",
114+
115+
"LC_ALL" to "en_US.UTF-8",
116+
"BPE_LC_ALL" to "en_US.UTF-8",
117+
118+
"BPE_BPL_JVM_THREAD_COUNT" to "50",
119+
"BPE_BPL_JVM_HEAD_ROOM" to "5",
120+
"BPE_BPL_JVM_LOADED_CLASS_COUNT" to "38000",
121+
122+
"TRAINING_RUN_JAVA_TOOL_OPTIONS" to "-XX:+UnlockExperimentalVMOptions -XX:+UseCompactObjectHeaders -Dspring.profiles.active=prewarm",
123+
124+
"BPE_PREPEND_JAVA_TOOL_OPTIONS" to "-XX:+UseSerialGC -XX:+UnlockExperimentalVMOptions -XX:+UseCompactObjectHeaders",
125+
"BPE_DELIM_JAVA_TOOL_OPTIONS" to " ",
126+
"BPE_APPEND_JAVA_TOOL_OPTIONS" to "-XX:ReservedCodeCacheSize=30M -Xss200K -Xlog:cds=info -Xlog:aot=info -Xlog:class+path=info -Dfile.encoding=UTF-8 -Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8",
117127
)
118128
}
119129

0 commit comments

Comments
 (0)