summaryrefslogtreecommitdiff
path: root/src/main/docker/Dockerfile.jvm
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-01-28 22:31:12 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-01-28 22:31:12 +0100
commitf7bf7c44664a9f48a8839a961680f17314dcae6e (patch)
tree2acc86ab2c38cfe7fc57033c6bd7fa67531ce13e /src/main/docker/Dockerfile.jvm
parent2f5374598fbdfbf5ccdf44930706133bc7986e83 (diff)
Maven, Gradle: Build Docker image.
Change-Id: Ibf90cd31af67f847d67bd34fe1a8d73d49550088
Diffstat (limited to 'src/main/docker/Dockerfile.jvm')
-rw-r--r--src/main/docker/Dockerfile.jvm23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/main/docker/Dockerfile.jvm b/src/main/docker/Dockerfile.jvm
index c7ff48c..5c726c5 100644
--- a/src/main/docker/Dockerfile.jvm
+++ b/src/main/docker/Dockerfile.jvm
@@ -7,28 +7,25 @@
#
# Then, build the image with:
#
-# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/mulkcms2-jvm .
+# docker build -f src/main/docker/Dockerfile.jvm -t docker.benkard.de/mulk/mulkcms2 .
#
# Then run the container using:
#
-# docker run -i --rm -p 8080:8080 quarkus/mulkcms2-jvm
+# docker run -i --rm -p 8080:8080 docker.benkard.de/mulk/mulkcms2
#
###
-FROM fabric8/java-alpine-openjdk8-jre:1.6.5
-ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
-ENV AB_ENABLED=jmx_exporter
+FROM adoptopenjdk:13-jre-hotspot
-# Be prepared for running in OpenShift too
-RUN adduser -G root --no-create-home --disabled-password 1001 \
- && chown -R 1001 /deployments \
+RUN mkdir -p /deployments
+
+RUN useradd --user-group --uid 1200 java \
+ && chown -R java /deployments \
&& chmod -R "g+rwX" /deployments \
- && chown -R 1001:root /deployments
+ && chown -R java:java /deployments
COPY build/lib/* /deployments/lib/
COPY build/*-runner.jar /deployments/app.jar
EXPOSE 8080
-# run with user 1001
-USER 1001
-
-ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file
+USER java
+ENTRYPOINT ["java", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseShenandoahGC", "-XX:ShenandoahGCHeuristics=compact", "-Dquarkus.http.host=0.0.0.0", "-Djava.util.logging.manager=org.jboss.logmanager.LogManager", "-jar", "/deployments/app.jar"]