diff options
Diffstat (limited to 'vendor/Dockerfile/OpenJDK.Dockerfile')
-rw-r--r-- | vendor/Dockerfile/OpenJDK.Dockerfile | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/vendor/Dockerfile/OpenJDK.Dockerfile b/vendor/Dockerfile/OpenJDK.Dockerfile index 8a2ae62d93b..c68420b453a 100644 --- a/vendor/Dockerfile/OpenJDK.Dockerfile +++ b/vendor/Dockerfile/OpenJDK.Dockerfile @@ -1,8 +1,12 @@ -FROM openjdk:9 +FROM maven:3.5-jdk-11 as BUILD -COPY . /usr/src/myapp -WORKDIR /usr/src/myapp +COPY . /usr/src/app +RUN mvn --batch-mode -f /usr/src/app/pom.xml clean package -RUN javac Main.java +FROM openjdk:11-jdk +ENV PORT 4567 +EXPOSE 4567 +COPY --from=BUILD /usr/src/app/target /opt/target +WORKDIR /opt/target -CMD ["java", "Main"] +CMD ["/bin/bash", "-c", "find -type f -name '*-with-dependencies.jar' | xargs java -jar"] |