Dockerfile 293 B

12345678910111213141516
  1. FROM openjdk:8 as base
  2. LABEL email="liuyuqi<liuyuqi.gov@msn.cn>"
  3. WORKDIR /app
  4. COPY . /app
  5. ENV JAVA_HOME=xx
  6. FROM base as builder
  7. RUN mvn package
  8. FROM base as runner
  9. WORKDIR /app
  10. COPY --from=builder ./target/*.jar app.jar
  11. EXPOSE 8080
  12. VOLUME [ "/data" ]
  13. ENTRYPOINT ["java", "-jar", "/app.war"]