debian-mirror-gitlab/vendor/Dockerfile/OpenJDK.Dockerfile

13 lines
319 B
Docker
Raw Normal View History

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