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

Fix graalvm download url #1041

Merged
merged 2 commits into from
Oct 22, 2024
Merged

Fix graalvm download url #1041

merged 2 commits into from
Oct 22, 2024

Conversation

melix
Copy link
Collaborator

@melix melix commented Oct 22, 2024

No description provided.

melix added 2 commits October 22, 2024 12:11
This is the Gradle's counterpart to micronaut-projects/micronaut-maven-plugin#1219

The fix is slightly different since we already had a way to define the base path, but not the full path.
Now the plugin provides the option to completely override the GraalVM download URL, in case the derivation
from the JDK and arch properties is not good enough.
@melix melix added type: bug Something isn't working relates-to: graal labels Oct 22, 2024
@melix melix added this to the 4.4.4 milestone Oct 22, 2024
@melix melix self-assigned this Oct 22, 2024
Copy link

@melix melix merged commit fe4b58e into master Oct 22, 2024
7 checks passed
@melix melix deleted the cc/fix-graalvm-download-url branch October 22, 2024 11:39
melix added a commit that referenced this pull request Oct 22, 2024
* Fix GraalVM download URL

This is the Gradle's counterpart to micronaut-projects/micronaut-maven-plugin#1219

The fix is slightly different since we already had a way to define the base path, but not the full path.
Now the plugin provides the option to completely override the GraalVM download URL, in case the derivation
from the JDK and arch properties is not good enough.

* Update Amazon Linux base image
@@ -431,13 +460,13 @@ private void setupInstructions(List<Instruction> additionalInstructions) {
if (buildStrategy == DockerBuildStrategy.LAMBDA) {
from(new From(imageResolver.resolve()).withStage("graalvm"));
environmentVariable("LANG", "en_US.UTF-8");
runCommand("yum install -y gcc gcc-c++ glibc-devel glibc-langpack-en curl-minimal bash zlib zlib-devel zlib-static zip tar gzip");
runCommand("dnf update -y && dnf install -y gcc glibc-devel zlib-devel libstdc++-static tar && dnf clean all && rm -rf /var/cache/dnf");

Choose a reason for hiding this comment

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

I'm getting an error message here when building now, looks like it wants gzip

Step 5/40 : RUN tar -zxf /tmp/graalvm-jdk-21_linux-aarch64_bin.tar.gz -C /tmp && ls -d /tmp/graalvm-jdk-21* | grep -v "tar.gz" | xargs -I_ mv _ /usr/lib/graalvm
 ---> Running in b86271e6df5a
tar (child): gzip: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now

Choose a reason for hiding this comment

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

Nevermind, it looks like the image was changed to 2023-minimal, I had it set to amazonlinux:2023. Works with the new image.

Copy link
Member

Choose a reason for hiding this comment

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

@melix since the Gradle plugin allows changing this base image, you should change it to install gzip. That will work for both images.

Note that the change to the minimal image is intentional and more correct, since it is what AWS uses in the provided runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relates-to: graal type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants