Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Adapt base image to jre alpine to save disk space and network usage #59 #60

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion packs/appserver/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:8-jdk-alpine
FROM openjdk:8-jre-alpine
ENV PORT 8080
EXPOSE 8080
COPY target/*.war /opt/app.war
Expand Down
4 changes: 2 additions & 2 deletions packs/gradle/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM openjdk:8-jdk-slim
FROM openjdk:8-jre-alpine
ENV PORT 8080
EXPOSE 8080
COPY build/libs/*.jar /opt/app.jar
WORKDIR /opt
CMD ["java", "-jar", "app.jar"]
ENTRYPOINT exec java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap $JAVA_OPTS -jar app.jar
6 changes: 3 additions & 3 deletions packs/gradle/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ service:
fabric8.io/ingress.annotations: "kubernetes.io/ingress.class: nginx"
resources:
limits:
cpu: 500m
memory: 512Mi
cpu: 1800m
memory: 768Mi
requests:
cpu: 400m
cpu: 600m
memory: 512Mi
probePath: /actuator/health
livenessProbe:
Expand Down
5 changes: 3 additions & 2 deletions packs/maven/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:8-jdk-slim
FROM openjdk:8-jre-alpine
ENV PORT 8080
ENV CLASSPATH /opt/lib
EXPOSE 8080
Expand All @@ -11,4 +11,5 @@ COPY pom.xml target/lib* /opt/lib/
# we could do with a better way to know the name - or to always create an app.jar or something
COPY target/*.jar /opt/app.jar
WORKDIR /opt
CMD ["java", "-jar", "app.jar"]

ENTRYPOINT exec java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap $JAVA_OPTS -jar app.jar
6 changes: 3 additions & 3 deletions packs/maven/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ service:
fabric8.io/ingress.annotations: "kubernetes.io/ingress.class: nginx"
resources:
limits:
cpu: 500m
memory: 512Mi
cpu: 1800m
memory: 768Mi
requests:
cpu: 400m
cpu: 600m
memory: 512Mi
probePath: /actuator/health
livenessProbe:
Expand Down