jonahkh
2020-05-13 4829e49af4e2cd4d8c8dfe0c215bd9f3d65efdfb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM quay.io/quarkus/centos-quarkus-maven:20.0.0-java11 AS build
 
WORKDIR /usr/src/app
 
# Cache dependencies
COPY pom.xml .
RUN mvn clean dependency:resolve
 
# Build native image
COPY src /usr/src/app/src
RUN mvn clean package -Pnative
 
## Stage 2 : create the docker final image
FROM registry.access.redhat.com/ubi8/ubi-minimal
WORKDIR /work/
COPY --from=build /usr/src/app/target/*-runner /work/application
RUN chmod 775 /work
EXPOSE 8080
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]