-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
JDK 17 ARM64 doesnt work - Java cannot run in AWS Fargate #308
Comments
Doing some initial research this line may be the culprit. Saw this issue in moby: moby/buildkit#1241 |
Makes sense... But we also have
on top of the Thanks a lot for your report. |
Thanks a lot @carpnick for raising this issue and sharing the potential solution! Looks like we forgot to remove the @carpnick are you ok to open a pull request, this is a nice contribution! |
Supposed to fix jenkinsci#308.
As I suspected, we're back to the first error. |
I wonder if the first error is related to QEMU 32bit/64 problem : https://bugs.launchpad.net/qemu/+bug/1805913 which then gets redirected to https://gitlab.com/qemu-project/qemu/-/issues/263 Until QEMU resolves - supporting arm32 in this repo will block folks trying to use arm64. This PR it was introduced for ARM32 |
I plead guilty. |
Would be worth using a multi-stage
WDYT? |
Great! |
How would it work @dduportal ? We have 2 images and need to selectively copy based on a special platform. This is me thinking out loud. I have been trying this locally and can't think of a way to do this without separating the docker files. The line that controls this assuming you get multistage working: |
Looking into docker-bake to see if we can do anything there |
@carpnick your analysis is correct: docker bake would be where the "condtionnal" would be by defining 2 different "targets" pointing to a Dockerfile targets each on the same |
I would love to try something, but I won't be able to address that before Wednesday. |
@gounthar and @dduportal - Thoughts - #310 I looked into this more and jlinks is not working for arm/v7. I tried manually and even loading in some config tools. I am not an expert on java compilation. So instead I took the approach that we just outright copy the java runtime as is in the arm32 case. I consider this the best answer of a bad situation due to the error we are running into. I think us playing with BUILDPLATFORM environment is the wrong choice as we will run into this same error with potentially a different platform. So the least risky way to go about it also increases docker image file size (at least with my knowledge). If we think it is good - I will clean it up properly. |
Looks like a good a approach to me |
I haven't had a thorough look yet, but what do you mean by
and
For me, |
@gounthar - sorry for not being clear. The Jenkins Error
|
Make sense : the additional size is not a problem if it is only on the arm32 images. |
Thank you all for feedback. I think #310 is ready to go. |
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
Reproduction steps
Try 1
docker pull jenkins/agent:3071.v7e9b_0dc08466-1-jdk17
docker run -it --entrypoint /bin/bash jenkins/agent:3071.v7e9b_0dc08466-1-jdk17
a. Run
java
within the container, error happens below:bash: /opt/java/openjdk/bin/java: cannot execute binary file: Exec format error
Try 2
Also tried the ARM64 specific image:
docker run -it --entrypoint /bin/bash jenkins/agent:3071.v7e9b_0dc08466-1-jdk17@sha256:bc386f73b3654d7ccaa73060ee66453be35795eb48d9d670d0eaeaa38e16688e
bash: /opt/java/openjdk/bin/java: cannot execute binary file: Exec format error
Try3
If I use the preview image it works...
docker run -it --entrypoint /bin/bash jenkins/agent:latest-jdk17-preview
Command Output
When running java it should print the java help and load the runtime correctly:
Actual Results
Anything else?
What is the difference between preview builds and versioned builds?
Overall I am trying to use the docker-inbound-agent on AWS Fargate ARM, but hitting issues with Java not being the correct runtime in the ARM image.
The text was updated successfully, but these errors were encountered: