awesome-compose/samples/spring-postgres/backend/Dockerfile
Guillaume Lours 7d4d65c780 Upgrade to Spring Boot 2.2.5
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2020-03-12 11:05:00 +01:00

13 lines
326 B
Docker
Executable File

FROM maven:3.6.3-jdk-11 AS build
COPY pom.xml .
RUN mvn --batch-mode dependency:resolve
COPY . .
RUN mvn --batch-mode package
RUN cp target/*jar target/app.jar
FROM openjdk:11-jre
EXPOSE 8080
VOLUME /tmp
COPY --from=build target/app.jar app.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]