Skip to content
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

Closed
wants to merge 3 commits into from
Closed

Conversation

plumsoftware
Copy link
Collaborator

@plumsoftware plumsoftware commented May 2, 2024

I couldn’t test the assembly, there was an error on the computer, the memory lack off.

@plumsoftware plumsoftware changed the title Добавил сборку под граль в докер Build for GraalVM May 2, 2024
[+] Changed correct url in Dockerfile for download graalVM
@plumsoftware
Copy link
Collaborator Author

@kiselev-danil, check this please.

@plumsoftware plumsoftware changed the base branch from develop to backend May 6, 2024 02:43
@plumsoftware plumsoftware changed the base branch from backend to develop May 6, 2024 02:45
@@ -1,4 +1,15 @@
FROM gradle:7-jdk11 AS build
FROM gradle:7-jdk11 AS graalvm-install
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а что у вас jdk версии отличаются?

ENV PATH=${JAVA_HOME}/bin:${PATH}

#FROM gradle:7-jdk11 AS build
FROM graalvm-jdk-17_linux-x64_bin.tar.gz AS build
Copy link
Collaborator

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

Copy link
Collaborator

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

@@ -1,4 +1,15 @@
FROM gradle:7-jdk11 AS build
FROM gradle:7-jdk11 AS graalvm-install
Copy link
Collaborator

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.

Copy link
Collaborator

@ayusavin ayusavin left a 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
@plumsoftware plumsoftware changed the base branch from develop to backend May 6, 2024 11:00
@plumsoftware plumsoftware changed the base branch from backend to develop May 6, 2024 11:00
@plumsoftware plumsoftware requested a review from ayusavin May 6, 2024 11:01
COPY . /home/gradle/src
WORKDIR /home/gradle/src
RUN ./gradlew buildFatJar --no-daemon

FROM openjdk:11
FROM build
Copy link
Collaborator

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

@ayusavin
Copy link
Collaborator

While the idea with GraalVM is frozen, we are busy tracing requests.

@ayusavin ayusavin closed this May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants