gitlab-org--gitlab-foss/vendor/Dockerfile/OpenJDK.Dockerfile
2018-09-10 10:30:17 +02:00

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"]