gitlab-runner-gateway/Dockerfile
Antoine 7bf586dabf
add graalvm compilation
logging not work properly for the moment
2020-08-18 00:46:49 +02:00

29 lines
611 B
Docker

FROM oracle/graalvm-ce:20.1.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 compile
# generate graalvm image into another layer
RUN ./mvnw -Pgraal package
FROM debian:buster
#FROM scratch
COPY --from=builder /build/target/wikiProject /wikiproject
RUN chmod +x /wikiproject
ENTRYPOINT ["/wikiproject"]