From 699c7c1e6d88943efc8540bfdbade52d98dc495d Mon Sep 17 00:00:00 2001 From: zxbu <32785355+zxbu@users.noreply.github.com> Date: Sat, 16 Jan 2021 11:02:20 +0800 Subject: [PATCH] Update Dockerfile --- Dockerfile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7493c87..1974e9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,10 @@ +FROM maven:3.6.3-jdk-8 AS maven +USER root +COPY ./ /tmp/code +RUN cd /tmp/code && mvn -s /tmp/code/settings.xml clean package -Dmaven.test.skip=true -Dmaven.javadoc.skip=true + + FROM java:8 -VOLUME /tmp -ADD webdav-teambition.jar /webdav-teambition.jar -ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/webdav-teambition.jar"] \ No newline at end of file +COPY --from=maven /tmp/code/target/*.jar /webdav-teambition.jar +EXPOSE 8080 +ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/webdav-teambition.jar"]