debian-mirror-gitlab/vendor/Dockerfile/OpenJDK.Dockerfile
2018-11-20 20:47:30 +05:30

12 lines
319 B
Docker

FROM maven:3.5-jdk-11 as BUILD
COPY . /usr/src/app
RUN mvn --batch-mode -f /usr/src/app/pom.xml clean package
FROM openjdk:11-jdk
ENV PORT 4567
EXPOSE 4567
COPY --from=BUILD /usr/src/app/target /opt/target
WORKDIR /opt/target
CMD ["/bin/bash", "-c", "find -type f -name '*-with-dependencies.jar' | xargs java -jar"]