-
Notifications
You must be signed in to change notification settings - Fork 41
/
Dockerfile-qn
30 lines (25 loc) · 1.14 KB
/
Dockerfile-qn
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
## Stage 1 : build with maven builder image with native capabilities
FROM quay.io/quarkus/ubi-quarkus-graalvmce-builder-image:22.3-java17 AS build
COPY --chown=quarkus:quarkus mvnw /code/mvnw
COPY --chown=quarkus:quarkus .mvn /code/.mvn
COPY --chown=quarkus:quarkus pom.quarkus.xml /code/pom.xml
COPY src/main/liberty/config/resources/security/key.p12 /code/key.p12
USER quarkus
WORKDIR /code
RUN ./mvnw -B org.apache.maven.plugins:maven-dependency-plugin:3.1.2:go-offline
COPY src /code/src
RUN ./mvnw package -Pnative -Dmaven.test.skip
## Stage 2 : create the docker final image
FROM quay.io/quarkus/quarkus-micro-image:2.0
WORKDIR /work/
COPY --from=build /code/target/*-runner /work/application
COPY --from=build /code/key.p12 /opt/key.p12
# set up permissions for user `1001`
RUN chmod 775 /work /work/application \
&& chown -R 1001 /work \
&& chmod -R "g+rwX" /work \
&& chown -R 1001:root /work
EXPOSE 9080
USER 1001
ENV KEYSTORE_LOCATION=/opt/key.p12
CMD ["./application", "-Dhttp.keepalive=true","-Dhttp.maxConnections=100","-Dquarkus.http.host=0.0.0.0","-Dquarkus.http.port=9080","-Djava.util.logging.manager=org.jboss.logmanager.LogManager"]