gitlab-runner-gateway/Dockerfile

30 lines
732 B
Docker

FROM oracle/graalvm-ce:20.2.0-java11 as builder
ADD .mvn/ /build/.mvn
ADD mvnw /build
WORKDIR /build
# Install GraalVM Native Image
RUN gu install native-image; \
./mvnw --version \
native-image --version
COPY pom.xml /build
RUN ./mvnw clean dependency:go-offline
ADD src/ /build/src/
ADD Makefile /build
# download dependencies and compile into layer
RUN ./mvnw -Pgraal,-no-graal compile
# generate graalvm image into another layer
RUN ./mvnw -Pgraal,-no-graal package
#FROM debian:buster
FROM scratch
COPY --from=builder /build/target/wiki-project /wikiproject
#COPY --from=builder /build/target/wiki-project-1.0-SNAPSHOT.jar /wiki-project-1.0-SNAPSHOT.jar
COPY --from=builder /tmp /tmp
ENTRYPOINT ["/wikiproject"]