This commit is contained in:
root
2025-09-21 18:43:30 +05:00
parent dfaebf81b8
commit 9ecfb5c904
3 changed files with 25 additions and 8 deletions
+2 -2
View File
@@ -25,5 +25,5 @@ RUN chown appuser:appgroup app.jar
# Switch to the non-root user
USER appuser
# Run the jar file with JVM flags for heap dump generation on OutOfMemoryError
ENTRYPOINT ["java", "-XX:+HeapDumpOnOutOfMemoryError", "-XX:HeapDumpPath=/dumps/heap.hprof", "-jar", "app.jar"]
# Run the jar file with JVM flags for heap dump generation on OutOfMemoryError and headless mode
ENTRYPOINT ["java", "-Djava.awt.headless=true", "-XX:+HeapDumpOnOutOfMemoryError", "-XX:HeapDumpPath=/dumps/heap.hprof", "-jar", "app.jar"]