Dockerfile 598 B

123456789101112131415161718192021
  1. FROM openjdk:8u272-jdk as builder
  2. WORKDIR application
  3. ARG JAR_FILE=target/jetlinks-standalone.jar
  4. COPY ${JAR_FILE} application.jar
  5. RUN java -Djarmode=layertools -jar application.jar extract
  6. FROM openjdk:8u272-jdk
  7. WORKDIR application
  8. COPY --from=builder application/dependencies/ ./
  9. RUN true
  10. COPY --from=builder application/snapshot-dependencies/ ./
  11. RUN true
  12. COPY --from=builder application/spring-boot-loader/ ./
  13. RUN true
  14. COPY --from=builder application/application/ ./
  15. RUN true
  16. COPY docker-entrypoint.sh ./
  17. RUN true
  18. RUN chmod +x docker-entrypoint.sh
  19. RUN true
  20. ENTRYPOINT ["./docker-entrypoint.sh"]