From c59d27eaa89a8b9cce818a508fc07c3ddf5ecc38 Mon Sep 17 00:00:00 2001 From: Michael Winsauer Date: Sat, 10 Nov 2018 03:44:23 +0100 Subject: [PATCH] Name build stages, run maven in batch mode --- service-twitter/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/service-twitter/Dockerfile b/service-twitter/Dockerfile index 26f882d..0e27ce0 100644 --- a/service-twitter/Dockerfile +++ b/service-twitter/Dockerfile @@ -1,19 +1,19 @@ -FROM openjdk:11-slim +FROM openjdk:11-slim as service-twitter-builder MAINTAINER Michael Winsauer COPY . /build WORKDIR /build -RUN ["./mvnw", "-q", "-Dmaven.test.skip", "package"] +RUN ["./mvnw", "--batch-mode", "--quiet", "-Dmaven.test.skip", "package"] -FROM openjdk:11-jre-slim +FROM openjdk:11-jre-slim as service-twitter MAINTAINER Michael Winsauer VOLUME /tmp EXPOSE 8084 -COPY --from=0 /build/target/service-twitter-0.1.0-SNAPSHOT.jar /app/service-twitter.jar +COPY --from=service-twitter-builder /build/target/service-twitter-0.1.0-SNAPSHOT.jar /app/service-twitter.jar WORKDIR /app ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "service-twitter.jar"] -- 2.43.0