Skip to content

Commit

Permalink
fix: failed unit tests when compile with Container
Browse files Browse the repository at this point in the history
because we didn't include `/usr/bin/git` inside container
  • Loading branch information
minh committed Jun 27, 2024
1 parent 1090628 commit c69e179
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
FROM quay.io/quarkus/ubi-quarkus-mandrel-builder-image:23.1-jdk-21

USER root

FROM docker.io/maven:3.9.7-eclipse-temurin-21-alpine AS build
COPY pom.xml /app/gis/
COPY .mvn /app/gis/.mvn
COPY mvnw /app/gis/
WORKDIR /app/gis
RUN ./mvnw -q verify clean --fail-never

RUN mvn -q verify clean --fail-never
COPY . /app/gis
RUN ./mvnw -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn clean package
RUN native-image -march=compatibility -cp target/gis-*.jar "org.nqm.Gis" --no-fallback
RUN apk add --no-cache git
RUN mvn -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn clean package

FROM quay.io/quarkus/ubi-quarkus-mandrel-builder-image:23.1-jdk-21
USER root
WORKDIR /app/gis
COPY --from=build /app/gis/target/gis-*.jar target/
COPY --from=build /app/gis/target/lib target/lib
RUN native-image -march=compatibility -cp target/gis-*.jar "org.nqm.Gis" --no-fallback
RUN mv org.nqm.gis gis
RUN chmod +x gis
RUN ./gis --version

0 comments on commit c69e179

Please sign in to comment.