mezzotre/Dockerfile

18 lines
418 B
Docker
Raw Normal View History

2023-03-21 18:09:06 +01:00
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"]