-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build for GraalVM #257
Build for GraalVM #257
Conversation
[+] Changed correct url in Dockerfile for download graalVM
@kiselev-danil, check this please. |
effectiveOfficeBackend/Dockerfile
Outdated
@@ -1,4 +1,15 @@ | |||
FROM gradle:7-jdk11 AS build | |||
FROM gradle:7-jdk11 AS graalvm-install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а что у вас jdk
версии отличаются?
effectiveOfficeBackend/Dockerfile
Outdated
ENV PATH=${JAVA_HOME}/bin:${PATH} | ||
|
||
#FROM gradle:7-jdk11 AS build | ||
FROM graalvm-jdk-17_linux-x64_bin.tar.gz AS build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docker engine cannot fetch layers from gunzipped tar, only from existing local or remote image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s better not to reinvent the wheel and download graalvm; to test the concept, it’s enough to use the collected images from graalvm itself
i. e.
FROM ghcr.io/graalvm/jdk-community:22.0.1
The same thing in the final step, instead of
FROM openjdk:11
Use the graalvm image, otherwise it makes no sense that you end up running the jar on OpenJDK
effectiveOfficeBackend/Dockerfile
Outdated
@@ -1,4 +1,15 @@ | |||
FROM gradle:7-jdk11 AS build | |||
FROM gradle:7-jdk11 AS graalvm-install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this stage used for? It performs some steps to download graalvm and is not used in any of the final layers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the comments and fix all issues
[~] changed image according to Arseniy`s comments
COPY . /home/gradle/src | ||
WORKDIR /home/gradle/src | ||
RUN ./gradlew buildFatJar --no-daemon | ||
|
||
FROM openjdk:11 | ||
FROM build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what reason you using the build stage, with the source code and all the garbage that appeared after the jar file build?
It was also necessary to build runtime image from a clean graalvm image
While the idea with GraalVM is frozen, we are busy tracing requests. |
I couldn’t test the assembly, there was an error on the computer, the memory lack off.