redkale-native.dockerfile 594 B

123456789101112131415161718192021
  1. FROM maven:3.9.6-amazoncorretto-21-debian as maven
  2. WORKDIR /redkale
  3. COPY src src
  4. COPY conf conf
  5. COPY pom.xml pom.xml
  6. RUN mvn package -q
  7. FROM ghcr.io/graalvm/native-image-community:22.0.2 as native
  8. WORKDIR /redkale
  9. COPY conf conf
  10. COPY --from=maven /redkale/target/redkale-benchmark-1.0.0.jar redkale-benchmark.jar
  11. RUN native-image -H:+ReportExceptionStackTraces --report-unsupported-elements-at-runtime -jar redkale-benchmark.jar
  12. FROM ghcr.io/graalvm/jdk-community:22.0.2
  13. WORKDIR /redkale
  14. COPY --from=native /redkale/redkale-benchmark redkale-benchmark
  15. EXPOSE 8080
  16. CMD ./redkale-benchmark