Attempt to reduce memory usage in Docker

Signed-off-by: William Brawner <me@wbrawner.com>
This commit is contained in:
William Brawner 2019-12-22 17:19:21 -06:00
parent 16e2a6a895
commit d80ade5ef6

View file

@ -14,6 +14,5 @@ RUN /home/maven/src/mvnw -DskipTests package
FROM openjdk:8-jdk-slim
EXPOSE 8080
COPY --from=builder /home/maven/src/target/budget-api.jar budget-api.jar
ENTRYPOINT ["/usr/local/openjdk-8/bin/java", "-Xmx3g", "-jar", "/budget-api.jar"]
ENTRYPOINT ["/usr/local/openjdk-8/bin/java", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseCGroupMemoryLimitForHeap", "-XX:MaxRAMFraction=1", "-Xmx256m", "-jar", "/budget-api.jar"]