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