This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Revert "Use native image for the backend""
This reverts commit 05191a4.
- Loading branch information
1 parent
05191a4
commit 073bdef
Showing
2 changed files
with
11 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
FROM eclipse-temurin:17-jdk AS builder | ||
#TODO Find a better way to build the native image | ||
FROM ubuntu:22.04 AS builder | ||
ADD ./gradle gradle | ||
ADD ./src src | ||
ADD ./gradlew gradlew | ||
ADD ./build.gradle.kts build.gradle.kts | ||
ADD ./settings.gradle.kts settings.gradle.kts | ||
RUN ./gradlew build | ||
RUN apt update && apt -y install build-essential libz-dev zlib1g-dev wget | ||
RUN wget -q https://download.oracle.com/graalvm/17/latest/graalvm-jdk-17_linux-x64_bin.tar.gz | ||
RUN tar xf graalvm-jdk-17_linux-x64_bin.tar.gz | ||
RUN export JAVA_HOME=/graalvm-jdk-17.0.9+11.1/;./gradlew nativeCompile | ||
|
||
FROM eclipse-temurin:17-jdk | ||
COPY --from=builder build/libs/carboncritters-0.0.1-SNAPSHOT.jar app.jar | ||
ENTRYPOINT ["java","-jar","/app.jar"] | ||
FROM ubuntu:22.04 | ||
COPY --from=builder build/native/nativeCompile/carboncritters carboncritters | ||
ENTRYPOINT ["./carboncritters"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters