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 Java 11 Alpine #211

Open
ST-DDT opened this Issue Jul 2, 2018 · 15 comments

Comments

Projects
None yet
9 participants
@ST-DDT

ST-DDT commented Jul 2, 2018

On the java page there is a alpine compatible build for Java 11.

http://jdk.java.net/11/
https://download.java.net/java/early_access/alpine/19/binaries/openjdk-11-ea+19_linux-x64-musl_bin.tar.gz

Could you please build a docker image for that, so I could start testing Java 11 before Java 8 goes EOL this year?

Or is it required to appear in the official repository that was linked in some other issues https://pkgs.alpinelinux.org/packages?name=openjdk*&branch=edge ?

@keckelt

This comment has been minimized.

keckelt commented Aug 1, 2018

I tinkered a bit today and wrote a Dockerfile with alpine 3.8 and the OpenJDK build: https://github.com/keckelt/openjdk11-alpine

It's my second Dockerfile, so I'm sure it could be improved. But it works.

@timbru31

This comment has been minimized.

timbru31 commented Aug 1, 2018

@keckelt - nice. One tip: delete the src.zip archive that's included to reduce the size (see e.g. here https://github.com/timbru31/docker-alpine-java-maven/blob/master/Dockerfile#L23)

@tianon

This comment has been minimized.

Member

tianon commented Aug 2, 2018

Isn't src.zip useful to include for many use cases? (Especially since this is already the full JDK, so not exactly "slim".)

For context, the current openjdk:11-jdk image contains src.zip:

$ docker run --rm openjdk:11-jdk find /usr -name src.zip
/usr/lib/jvm/java-11-openjdk-amd64/src.zip
@tianon

This comment has been minimized.

Member

tianon commented Aug 2, 2018

I'm a little bit concerned that this will be a divergence from our previous Alpine images (and will mean we can only support amd64), but given that https://bugs.alpinelinux.org/issues/8089 is still open and unresolved 9 months and 2 releases later, I think moving forward with the upstream-provided binaires for Alpine probably makes sense.

@tianon

This comment has been minimized.

Member

tianon commented Aug 2, 2018

(It looks like we could even add the Early Access builds of OpenJDK 12 via this method, which would get the jump on Debian too.)

@tianon

This comment has been minimized.

Member

tianon commented Aug 23, 2018

This is related to #212 too 👍

@nafeger

This comment has been minimized.

nafeger commented Oct 3, 2018

The openjdk build for alpine was removed for jdk 11, there is only an EAP for jdk12. Should the default download for linux jdk work on a stock alpine image?

See this note: http://jdk.java.net/11/

The linked docker file does still work, however, it appears to not be a supported version ala this info

@tianon

This comment has been minimized.

Member

tianon commented Oct 3, 2018

Yeah, see #212 (comment) and #235 (comment):

Yeah, the alpine port is not in a supported release, since it's not in the mainline code base, so it's only available as early access builds of OpenJDK Project Portola http://openjdk.java.net/projects/portola.

It works, but at this stage it basically needs community contributors to help maintain it and get it into mainline - see https://twitter.com/MikaelVidstedt/status/984920426655526912 for details. Interested contributors should drop by portola-dev to discuss specifics.

@nafeger

This comment has been minimized.

nafeger commented Oct 3, 2018

Yeah, see #212 (comment) and #235 (comment):

Yeah, the alpine port is not in a supported release, since it's not in the mainline code base, so it's only available as early access builds of OpenJDK Project Portola http://openjdk.java.net/projects/portola.
It works, but at this stage it basically needs community contributors to help maintain it and get it into mainline - see https://twitter.com/MikaelVidstedt/status/984920426655526912 for details. Interested contributors should drop by portola-dev to discuss specifics.

Thanks for the update, totally missed those comments.

@ngrigoriev

This comment has been minimized.

ngrigoriev commented Oct 10, 2018

Please correct me if I am wrong, but going forward - which OpenJDK build will be used by Alpine for the official images? Oracle will stop making OpenJDK builds in 5 months. Portola does not seem to make any statements about it. I am trying to find a stable source of OpenJDK 11 images going forward (beyond the timeframe of 5 months), this is why I am looking for an answer.

@tianon

This comment has been minimized.

Member

tianon commented Oct 10, 2018

Please correct me if I am wrong, but going forward - which OpenJDK build will be used by Alpine for the official images?

Right now, the official images have no plans to support Alpine for OpenJDK 11 -- the Alpine project is not producing usable or timely builds since OpenJDK 8 (https://bugs.alpinelinux.org/issues/8089), and Project Portola (as noted above) does not have the necessary manpower to be fully supported by Oracle, so there's really nothing we can do there except recommend that interested folks go get involved with Project Portola.

For OpenJDK 12 EA builds, we currently have Alpine builds courtesy of Portola, but those might go away with 12's GA if Portola doesn't get enough support before then.

@michaelbannister

This comment has been minimized.

michaelbannister commented Oct 24, 2018

@ST-DDT

This comment has been minimized.

ST-DDT commented Oct 24, 2018

@michaelbannister Are there any slim builds for that repo? Also I'm missing the tags for "just java 11" what is jdk-11.28) and the distinction between jre and jdk.

The images are smaller that this repository's non-slim ones though. Is there less of something in there?

@michaelbannister

This comment has been minimized.

michaelbannister commented Oct 24, 2018

@ST-DDT I should've made clear that I haven't yet tried using these images (but I've been aware of the AdoptOpenJDK efforts for a few months). I only just found out they were producing Alpine images.
If you look at the tags for adoptopenjdk/openjdk11 you'll see they include jdk-11.28-alpine, alpine (I'm guessing that's equivalent of latest jdk-11)

See the readme for more detail, including the fact that:

The Alpine Linux and the slim images are not yet TCK certified.
https://github.com/AdoptOpenJDK/openjdk-docker#supported-builds-and-build-types

@robilad

This comment has been minimized.

robilad commented Nov 13, 2018

A bit more on Portola status is available here: https://mjg123.github.io/2018/11/05/alpine-jdk11-images.html

" In order to move Alpine to “supported” and have GA releases of Portola Oracle is looking for people to be actively interested: contribute to the extent of your abilities - code and tests are welcome but so is being active and public about your support - say if you find any issues, and say too if everything worked fine. If containers are critical to your company, saying that you would be interested in a Java SE Subscription if Alpine were supported would go a long way, too."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment