Ravi Srinivasan
2020-04-27 93a1f7d8a18cccc002ce06e747bdf79868171ebe
commit | author | age
3e1172 1 ####
RS 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 #
93a1f7 6 # mvn clean package
3e1172 7 #
RS 8 # Then, build the image with:
9 #
10 # docker build -t <your_tag> .
11 #
12 # Then run the container using:
13 #
14 # docker run -i --rm -p 8080:8080 <your_tag>
15 #
16 ###
93a1f7 17 FROM ubi8:8.1
RS 18
3e1172 19 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
RS 20 ENV AB_ENABLED=jmx_exporter
21
22 # Be prepared for running in OpenShift too
93a1f7 23 RUN mkdir /deployments \
RS 24   && adduser -G root --no-create-home -u 1001 quarkus \
3e1172 25   && chown -R 1001 /deployments \
RS 26   && chmod -R "g+rwX" /deployments \
27   && chown -R 1001:root /deployments
93a1f7 28
RS 29 RUN yum -y install java-1.8.0-openjdk-devel
3e1172 30
RS 31 COPY target/*-runner.jar /deployments/app.jar
32 EXPOSE 8080 8778 9779
33
34 # run with user 1001
35 USER 1001
36
93a1f7 37 CMD ["java","-jar","/deployments/app.jar"]