Skip to content

Commit e6d3f92

Browse files
runtime: add Java 11 JVM flags for G1GC and unified logging
Co-Authored-By: Joao Esteves <joao.esteves@cognition.ai>
1 parent d57e5ee commit e6d3f92

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,7 @@ COPY --from=builder /src/target/*.jar /src/target/bankapp.jar
3333
# Expose application port
3434
EXPOSE 8080
3535

36-
# Start the application
37-
ENTRYPOINT ["java", "-jar", "/src/target/bankapp.jar"]
36+
# Start the application with Java 11 optimizations
37+
# -XX:+UseG1GC: Use G1 garbage collector (default in Java 11)
38+
# -Xlog:gc*: Enable unified GC logging (Java 9+ format)
39+
ENTRYPOINT ["java", "-XX:+UseG1GC", "-Xlog:gc*:file=/var/log/gc.log:time,uptime,level,tags", "-jar", "/src/target/bankapp.jar"]

0 commit comments

Comments
 (0)