containers icon indicating copy to clipboard operation
containers copied to clipboard

Support alpine images for aarch64

Open mrdziuban opened this issue 3 years ago β€’ 15 comments

Building the alpine images on an Apple silicon (M1) Mac currently fails with an "Unsupported arch: aarch64" error, e.g. from this code. Would it be possible to add support for this architecture? Thanks in advance!

mrdziuban avatar Feb 07 '22 16:02 mrdziuban

@mrdziuban: As a workaround you can use Bellsoft's images. They already have alpine/musl images for aarch64: https://hub.docker.com/r/bellsoft/liberica-openjdk-alpine-musl/tags?page=1&name=17

henrik242 avatar Feb 21 '22 13:02 henrik242

I guess it would be more difficult than just adding aarch64 for alpine, am I right? (yes, I did it, and it wasn't enough to generate the right Dockerfile in 11/jre/alpine/ for example. /8/jdk/ubuntu is building fine.

gounthar avatar Mar 04 '22 22:03 gounthar

I guess it would be more difficult than just adding aarch64 for alpine, am I right? (yes, I did it, and it wasn't enough to generate the right Dockerfile in 11/jre/alpine/ for example. /8/jdk/ubuntu is building fine.

Definitely more work required (we haven't looked into it yet)

karianna avatar Mar 07 '22 10:03 karianna

Let me know if I ever can help.

gounthar avatar Mar 07 '22 11:03 gounthar

@karianna : if ever the blocking point was the lack of hardware for building/testing, let me know, and I'll see what I can do.

gounthar avatar May 16 '22 08:05 gounthar

We are getting ever closer with Alpine aarch64 images. We now have some nightly builds available on the website and aim to get some release builds available soon which can in turn be added to our docker images

gdams avatar May 19 '22 20:05 gdams

Fantastic news @gdams , thanks for the update!

gounthar avatar May 20 '22 13:05 gounthar

@gdams - is there a published roadmap that would show roughly when the nightly aarch64 images will move to into the release builds?

setchy avatar Jun 08 '22 18:06 setchy

July PSU is our next best bet (no promised though!)

karianna avatar Jun 08 '22 19:06 karianna

Hi there πŸ‘‹

I see regular builds for aarch64 Alpine, which is nice. πŸ«‚ Could anyone please give me a link to the July PSU? I don't know how to find the date linked to that event. Thanks.

gounthar avatar Jul 05 '22 08:07 gounthar

FYI - The Alpine aarch64 builds aren't very stable at the moment. The July PSU even hasn't been created yet.

karianna avatar Jul 05 '22 08:07 karianna

Update: Note that at the moment JDK11u buids for Alpine/aarch64 are unstable so we've switched off the nightlies on those for now. Other releases have been left in but have not yet undergone significant analysis of testing results yet.

sxa avatar Jul 05 '22 11:07 sxa

Thanks for the update @sxa and @karianna πŸ™ .

gounthar avatar Jul 05 '22 13:07 gounthar

Hi @sxa, any further updates re timelines for this ticket

setchy avatar Sep 29 '22 18:09 setchy

Hi @sxa, any further updates re timelines for this ticket

We need to get it to a state where it fully passes the AQA tests. We've got some versions in a reasonable state and are looking to get systems available that we can run the TCK on (We cannot distribute JDKs that do not pass the TCK.

We have seen some hangs with some Alpine/aarch64 builds with some versions though, which will be blockers for releasing those (From memory JDK11 was affected by that).

You can see the latest nightly build jobs, and grab the artifacts to test them if you want, from the following jenkins jobs:

It's also worth pointing out that as an interim measure if you have Rosetta2 installed on your M1 system you can run the x64 version e.g.

podman run --rm -it --platform=linux/amd64 eclipse-temurin:17-alpine 

Or s/podman/docker/ if that's what you have installed

sxa avatar Oct 06 '22 13:10 sxa

Azul Zulu is an alternative vs Bellsoft Liberica for local development:

And this project is building arm64 images of Temurin.

efenderbosch avatar Nov 29 '22 14:11 efenderbosch

Is there any updates on java 11 on alpine/aarch64?

mv912 avatar Feb 22 '23 12:02 mv912

It would be really good if there was a version for arm64. That would make it so much easier in the daily work of development.

domehahn avatar Feb 23 '23 12:02 domehahn

Hi @karianna, @sxa, I know that we can’t expect an ETA from this specific issue, but is is being worked on? I would like to know if this work is going to continue to decide between staying in alpine or moving to Debian

paoliniluis avatar Mar 25 '23 12:03 paoliniluis

@paoliniluis We don't have anyone currently working on this (waiting for a volunteer basically :-))

karianna avatar Mar 26 '23 23:03 karianna

Thank you @karianna for your quick reply and honesty

paoliniluis avatar Mar 26 '23 23:03 paoliniluis

What happens if the aarch64 releases from https://github.com/adoptium/temurin17-binaries/releases are added to the alpine image switch case?

OneCricketeer avatar May 01 '23 21:05 OneCricketeer

For me, it just won't work because it's built for libc and not musl.

gounthar avatar May 02 '23 08:05 gounthar

Really need arm support for 20.0.1_9-jdk-alpine, 20-jdk-alpine, 20-alpine cc https://github.com/carlossg/docker-maven/issues/356

niemyjski avatar May 02 '23 19:05 niemyjski

Finally, we have moved all our cluster services images to Amazon Corretto because of this

nightswimmings avatar May 11 '23 14:05 nightswimmings

This is a much-needed feature that affects the developer experience. Would be great if we can have this ;(

xlight05 avatar Jul 14 '23 13:07 xlight05

To be clear on what's required here:

  • We need to make sure the builds are stable for the versions we're interested in (Ideally we'd start from JDK21, but 17 is a possibility, I've had hangs from JDK11 so that is likely completely out of scope for now). We have already integrated the platform into regular jenkins pipelines - here the are for each version with a quick summary of where it is:
    • JDK11 - This was hanging quite regularly so we disabled regular build+test although the last two runs that were done looked ok. I've kicked off a test today of the last tagged release - jdk-11.0.18+7 - to see how that goes.
    • JDK17 - Looks in a reasonable state at the moment :-)
    • JDK20 - Build failure, although that's likely not too hard to fix as it's currently trying to use the wrong boot JDK (JDK18 for JDK20 which isn't supported)
    • JDK21 - Build failure with a missing class - potentially because it uses a JDK20 for the bootstrapping and that build is quite out of date now with the JDK20 pipelines failing
  • Once those are done we need to run the TCK compliance suite before we can ship on this platform (That part of it is restricted access sadly, but if we can get the normal build and AQA test jobs to a state where they are all running cleanly then we can look at doing that side of it)
  • Once the builds are clean and passing the TCK we will be able to generate and publish container images to dockerhub alongside the existing ones. As @karianna said earlier, volunteers to move this forward are welcome :-) Ideal requirements would be if you have a system on which you can run builds and test suites and diagnose any problems. Quick samples on how to get started
  1. Start up the adoptopenjdk/alpine3_build_image container from dockerhub
  2. Follow the steps in this FAQ entry which shows you what to run to build the JDK inside the container
  3. Follow this FAQ entry as a quick intro on how to run the test suites. The test jobs in jenkins can hopefully provide an idea of the current state of the jobs so you can target your efforts.

sxa avatar Jul 17 '23 10:07 sxa

If we had the ability to "launch" this support with JDK17 (and JRE17) only due to it being the closest to being "ready" that'd be a huge win in my view.

chadlwilson avatar Jul 17 '23 12:07 chadlwilson

If we had the ability to "launch" this support with JDK17 (and JRE17) only due to it being the closest to being "ready" that'd be a huge win in my view.

The most likely scenario is to attempt to it with JDK21 - which is LTS and will be GA in September, but that is of course subject to having people to analyse the test results and ensure they are good enough for us to release it.

As an update to what I said in the earlier comment, JDK20 and JDK21 (which was blocked on JDK20) are now able to build successfully so they are in a reasonable state too, subject to testing.

sxa avatar Aug 10 '23 09:08 sxa

Can we get a status update if this will be shipped with JDK 21 (which will be GA in ~5 days)?

Thanks in advance :)

AB-xdev avatar Sep 14 '23 14:09 AB-xdev