mezzotre/Dockerfile

18 lines
418 B
Docker

ARG DEBUG_BUILD
FROM maven:3.8-openjdk-17 as builder
WORKDIR /build
COPY . /build
RUN mvn package -B -DskipTests=true \
-Dmaven.test.skip=true \
-Dmaven.site.skip=true \
-Dmaven.javadoc.skip=true | grep -Ev '(Downloading|Downloaded)'
FROM gcr.io/distroless/java17:${DEBUG_BUILD}nonroot
COPY --from=builder /build/target/mezzotre.jar /opt/mezzotre.jar
ENTRYPOINT ["java", "-jar", "/opt/mezzotre.jar"]