From 43fbb0fa7d5b8c80359d37be71f6869cba79a3ce Mon Sep 17 00:00:00 2001 From: thinkAfCod Date: Tue, 9 Jul 2024 22:36:48 +0800 Subject: [PATCH 1/2] create dockerfile in project root dir --- Dockerfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..82eb6990 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM ghcr.io/graalvm/graalvm-community:21 as builder + +WORKDIR /root/hildr +COPY . . +RUN ./gradlew clean buildJarForDocker + +FROM ghcr.io/graalvm/graalvm-community:21 + +WORKDIR /usr/local/bin +COPY --from=builder /root/hildr/hildr-node/build/docker/hildr-node.jar . +COPY --from=builder /root/hildr/docker/start-hildr-node.sh . +ENV HILDR_JAR /usr/local/bin/hildr-node.jar +ENV HILDR_MAIN_CLASS io.optimism.Hildr + +ENTRYPOINT ["java", "--enable-preview", "-cp" , "/usr/local/bin/hildr-node.jar", "io.optimism.Hildr"] From a086f0e586698ef9bc800208ae36c6e41c80d962 Mon Sep 17 00:00:00 2001 From: thinkAfCod Date: Tue, 9 Jul 2024 22:37:57 +0800 Subject: [PATCH 2/2] delete docker/Dockerfile --- docker/Dockerfile | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 docker/Dockerfile diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index 82eb6990..00000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM ghcr.io/graalvm/graalvm-community:21 as builder - -WORKDIR /root/hildr -COPY . . -RUN ./gradlew clean buildJarForDocker - -FROM ghcr.io/graalvm/graalvm-community:21 - -WORKDIR /usr/local/bin -COPY --from=builder /root/hildr/hildr-node/build/docker/hildr-node.jar . -COPY --from=builder /root/hildr/docker/start-hildr-node.sh . -ENV HILDR_JAR /usr/local/bin/hildr-node.jar -ENV HILDR_MAIN_CLASS io.optimism.Hildr - -ENTRYPOINT ["java", "--enable-preview", "-cp" , "/usr/local/bin/hildr-node.jar", "io.optimism.Hildr"]