-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile.arm64
23 lines (21 loc) · 1.09 KB
/
Dockerfile.arm64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
##########################################################################
######### Stage 1 : Using maven builder with native capabilities #########
##########################################################################
FROM quay.io/quarkus/ubi-quarkus-native-image:22.1.0-java17-arm64 AS build
COPY --chown=quarkus:quarkus mvnw /code/mvnw
COPY --chown=quarkus:quarkus .mvn /code/.mvn
COPY --chown=quarkus:quarkus pom.xml /code/
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 clean package -Pnative -DskipTests
##########################################################################
##################### Stage 2 : Create Docker Image ######################
##########################################################################
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest@sha256:f9771e9524379bcb4874d379a01d4c30c0d2a452a9b2eafc1d82215e40e3d1f2
WORKDIR /work/
COPY --from=build /code/target/*-runner /work/application
RUN chmod 775 /work
EXPOSE 8080
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]