From d80ade5ef66e82840bb3bc8d902919b0197d2da0 Mon Sep 17 00:00:00 2001 From: William Brawner Date: Sun, 22 Dec 2019 17:19:21 -0600 Subject: [PATCH] Attempt to reduce memory usage in Docker Signed-off-by: William Brawner --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f4ff166..c3f593b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"]