FROM openjdk:11-slim MAINTAINER Michael Winsauer COPY . /build WORKDIR /build RUN ["./mvnw", "-q", "-Dmaven.test.skip", "package"] FROM openjdk:11-jre-slim MAINTAINER Michael Winsauer VOLUME /tmp EXPOSE 8084 COPY --from=0 /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"]