blob: c7ff48c485c0bd2d7d9619028c1d27c12889009e [file] [log] [blame]
Matthias Andreas Benkard4c5847b2020-01-12 15:42:02 +01001####
2# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
3#
4# Before building the docker image run:
5#
6# mvn package
7#
8# Then, build the image with:
9#
10# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/mulkcms2-jvm .
11#
12# Then run the container using:
13#
14# docker run -i --rm -p 8080:8080 quarkus/mulkcms2-jvm
15#
16###
17FROM fabric8/java-alpine-openjdk8-jre:1.6.5
18ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
19ENV AB_ENABLED=jmx_exporter
20
21# Be prepared for running in OpenShift too
22RUN adduser -G root --no-create-home --disabled-password 1001 \
23 && chown -R 1001 /deployments \
24 && chmod -R "g+rwX" /deployments \
25 && chown -R 1001:root /deployments
26
27COPY build/lib/* /deployments/lib/
28COPY build/*-runner.jar /deployments/app.jar
29EXPOSE 8080
30
31# run with user 1001
32USER 1001
33
34ENTRYPOINT [ "/deployments/run-java.sh" ]