Dockerfile 528 B

1234567891011121314151617181920
  1. # FROM openjdk:8
  2. # FROM openjdk:8-jdk-alpine
  3. FROM maven:3.8.4-openjdk-11-slim AS builder
  4. LABEL email="liuyuqi<liuyuqi.gov@msn.cn>"
  5. WORKDIR /app
  6. # COPY pom.xml .
  7. # COPY src ./src
  8. # RUN mvn clean package -DskipTests
  9. VOLUME [ "/app" ]
  10. CMD ["/bin/sh", "-c", "while true; do sleep 1000; done"]
  11. # FROM openjdk:11-jre-slim as runner
  12. # WORKDIR /app
  13. # ARG JAVA_OPTS
  14. # ENV JAVA_OPTS=$JAVA_OPTS
  15. # COPY --from=builder ./target/*.jar app.jar
  16. # EXPOSE 8080
  17. # VOLUME [ "/app" ]
  18. # ENTRYPOINT ["exec", "java","$JAVA_OPTS" , "-jar", "app.jar"]