Update Dockerfile

This commit is contained in:
zxbu 2021-01-16 11:02:20 +08:00 committed by GitHub
parent 3f2807b7fe
commit 699c7c1e6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 3 deletions

View File

@ -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"]
COPY --from=maven /tmp/code/target/*.jar /webdav-teambition.jar
EXPOSE 8080
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/webdav-teambition.jar"]