Add flags: production JVM flag cheat sheet for Spring Boot on JDK 25/27
MaxRAMPercentage vs a hardcoded -Xmx, -XX:-UseContainerSupport, the ActiveProcessorCount lie, and which diagnostic flags are worth leaving on in prod, verified in real Docker containers on JDK 25 and JDK 27. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# No eclipse-temurin:27-* tag exists on Docker Hub yet (checked 2026-10-01) so this
|
||||
# installs the Adoptium Temurin 27 GA tarball directly onto a slim Ubuntu base.
|
||||
FROM ubuntu:24.04
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/*
|
||||
COPY temurin27.tar.gz /tmp/temurin27.tar.gz
|
||||
RUN mkdir -p /opt/java && tar -xzf /tmp/temurin27.tar.gz -C /opt/java --strip-components=1 && rm /tmp/temurin27.tar.gz
|
||||
ENV JAVA_HOME=/opt/java
|
||||
ENV PATH=$JAVA_HOME/bin:$PATH
|
||||
WORKDIR /app
|
||||
COPY flags-demo.jar app.jar
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["java","-jar","/app/app.jar"]
|
||||
Reference in New Issue
Block a user