This commit is contained in:
root
2025-11-20 02:27:41 +05:00
parent 1d460d2402
commit f8e0f4b503
+2 -5
View File
@@ -7,9 +7,6 @@ RUN mvn clean install -DskipTests
FROM openjdk:21-jdk-slim
RUN apt-get update && \
apt-get install -y libfreetype6 fontconfig && \
rm -rf /var/lib/apt/lists/*
# Create a non-root user and group for security
RUN groupadd -r appgroup && useradd -r -s /bin/false -g appgroup appuser
@@ -28,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 and headless mode
ENTRYPOINT ["java", "-Djava.awt.headless=true", "-XX:+HeapDumpOnOutOfMemoryError", "-XX:HeapDumpPath=/dumps/heap.hprof", "-jar", "app.jar"]
# 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"]