summaryrefslogtreecommitdiff
path: root/src/main/docker/Dockerfile.jvm
blob: e059b5d7fa39f2c2b809ed3d21050d132ef0e361 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#
# Before building the docker image run:
#
# mvn package
#
# Then, build the image with:
#
# 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 docker.benkard.de/mulk/mulkcms2
#
###
FROM adoptopenjdk:13-jre-hotspot

RUN mkdir -p /deployments

RUN useradd --user-group --uid 1200 java \
  && chown -R java /deployments \
  && chmod -R "g+rwX" /deployments \
  && chown -R java:java /deployments

COPY target/lib/* /deployments/lib/
COPY target/*-runner.jar /deployments/app.jar
EXPOSE 8080

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"]