distroless icon indicating copy to clipboard operation
distroless copied to clipboard

Java 17 LTS - Eclipse Temurin support possible?

Open wyaeld opened this issue 3 years ago • 10 comments

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?

wyaeld avatar Feb 20 '22 23:02 wyaeld

Yeah sounds good to me. Feel free to create a pr. Fyi, I'm on vacation all week and won't be able to look at anything till Feb 28th.

On Sun, Feb 20, 2022, 18:36 Brad Murray @.***> wrote:

AdoptOpenJDK has migrated to Eclipse foundation, and the new distribution of Java is called Temuin 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 https://us.alibabacloud.com/, Huawei https://www.huawei.com/us/, IBM https://www.ibm.com/, iJUG https://www.ijug.eu/en/home/, Karakun AG https://karakun.com/en/home/, Microsoft https://www.microsoft.com/, New Relic https://newrelic.com/ and Red Hat https://www.redhat.com/. 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 https://github.com/loosebazooka Appu do you have an opinion on this?

— Reply to this email directly, view it on GitHub https://github.com/GoogleContainerTools/distroless/issues/961, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ6R6WA4CD3DFULVNII7P3U4F3GTANCNFSM5O5CLNIQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

loosebazooka avatar Feb 21 '22 00:02 loosebazooka

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.

loosebazooka avatar Mar 07 '22 13:03 loosebazooka

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.

wyaeld avatar Mar 07 '22 19:03 wyaeld

Any updates regarding this issue?

bennetelli avatar Nov 10 '22 15:11 bennetelli

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.

dlorenc avatar Nov 10 '22 15:11 dlorenc

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

rfan-debug avatar Dec 21 '22 01:12 rfan-debug

Any updates?

tlaukkan avatar Feb 20 '23 11:02 tlaukkan

Any update ?

Jojoooo1 avatar Apr 19 '23 00:04 Jojoooo1

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

NikolayMetchev avatar May 15 '23 14:05 NikolayMetchev

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" ]

NikolayMetchev avatar May 21 '23 10:05 NikolayMetchev