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

Java 17 LTS - Eclipse Temurin support possible? #961

Open
wyaeld opened this issue Feb 20, 2022 · 10 comments
Open

Java 17 LTS - Eclipse Temurin support possible? #961

wyaeld opened this issue Feb 20, 2022 · 10 comments

Comments

@wyaeld
Copy link

wyaeld commented Feb 20, 2022

AdoptOpenJDK has migrated to Eclipse foundation, and the new distribution of Java is called Temurin
https://blog.adoptopenjdk.net/2021/03/transition-to-eclipse-an-update/

This is TCK certified
https://www.infoq.com/news/2021/10/adoptium-releases-temurin-jdk/

It has debian packages
https://blog.adoptium.net/2021/12/eclipse-temurin-linux-installers-available/

It has major vendor support

Founding organizations of the Adoptium Working Group include Alibaba Cloud, Huawei, IBM, iJUG, Karakun AG, Microsoft, New Relic and Red Hat. Two representatives from each organization comprise the Adoptium Steering Committee.

I would like to know if we can get support for this in distroless or not?

@loosebazooka Appu do you have an opinion on this?

@loosebazooka
Copy link
Member

loosebazooka commented Feb 21, 2022 via email

@loosebazooka
Copy link
Member

loosebazooka commented Mar 7, 2022

Ah, yeah so these don't come from debian directly yet. It's possible that there is a solution that just defines this as an external repository, but that's a lower priority for us right now.

@wyaeld
Copy link
Author

wyaeld commented Mar 7, 2022

Yes, I had noticed that, and looked into what it would take for a PR, but my unfamiliarity with the build chain here was proving difficult.

@bennetelli
Copy link

Any updates regarding this issue?

@dlorenc
Copy link
Contributor

dlorenc commented Nov 10, 2022

Shameless plug, the Wolfi-based java images here are built with temurin 17: https://github.com/chainguard-images/jdk/blob/main/melange.yaml#L31

Feel free to give those a try.

@rfan-debug
Copy link

Any updates regarding this issue? It seems to be a pretty legitimate ask.

@tlaukkan
Copy link

Any updates?

@Jojoooo1
Copy link

Any update ?

@NikolayMetchev
Copy link

What would be even more useful is to make it easy to create a smaller image using jlink and jdeps

@NikolayMetchev
Copy link

NikolayMetchev commented May 21, 2023

I have a working solution with the following Dockerfile:

FROM debian:stable-slim AS jre-build
WORKDIR /app

# copy the dependencies into the docker image
COPY ./build/dockerRuntimeLibs/* build/lib/
COPY ./build/classes/kotlin/main/ build/classes/
COPY ./build/classes/java/main/ build/classes/

RUN apt-get update
RUN apt-get install -y wget apt-transport-https gnupg
RUN wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | apt-key add -
RUN echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list
RUN apt-get update
RUN apt-get install -y temurin-17-jdk=17.0.7.0.0+7

RUN jdeps \
--ignore-missing-deps \
-q \
--multi-release 17 \
--print-module-deps \
-cp "build/lib/*" \
build/classes/com/paxos/messaging/pes/service/ApplicationKt.class > jre-deps.info

RUN jlink --verbose \
--compress 2 \
--strip-java-debug-attributes \
--no-header-files \
--no-man-pages \
--output jre \
--add-modules $(cat jre-deps.info)

# take a smaller runtime image for the final output
FROM gcr.io/distroless/java-base-debian11:nonroot

WORKDIR /app

COPY --from=jre-build /app/jre jre

COPY --from=jre-build /app/build/lib/* ./lib/

COPY ./build/dockerRuntimeLibs/ ./libs/
COPY ./build/classes/kotlin/main/ ./classes/
COPY ./build/classes/java/main/ ./classes/
COPY ./build/resources/main/ ./resources/

ENTRYPOINT [ "/app/jre/bin/java", \
 "-cp", "/app/resources:/app/classes:/app/libs/*",\
 "-XshowSettings:system",\
 "-XX:MaxRAMPercentage=80",\
 "com.paxos.messaging.pes.service.ApplicationKt" ]

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

No branches or pull requests

8 participants