]> git.somenet.org - pub/jan/aic18.git/blob - service-twitter/Dockerfile
Use multi-stage build Dockerfile for Twitter Service
[pub/jan/aic18.git] / service-twitter / Dockerfile
1 FROM openjdk:11-slim
2 MAINTAINER Michael Winsauer <e1429715@student.tuwien.ac.at>
3
4 COPY . /build
5
6 WORKDIR /build
7 RUN ["./mvnw", "-q", "-Dmaven.test.skip", "package"]
8
9
10 FROM openjdk:11-jre-slim
11 MAINTAINER Michael Winsauer <e1429715@student.tuwien.ac.at>
12
13 VOLUME /tmp
14 EXPOSE 8084
15
16 COPY --from=0 /build/target/service-twitter-0.1.0-SNAPSHOT.jar /app/service-twitter.jar
17
18 WORKDIR /app
19 ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "service-twitter.jar"]