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

adoptopenjdk base image is deprecated and add support for Java 17 #3483

Closed
loosebazooka opened this issue Oct 21, 2021 · 17 comments
Closed

adoptopenjdk base image is deprecated and add support for Java 17 #3483

loosebazooka opened this issue Oct 21, 2021 · 17 comments

Comments

@loosebazooka
Copy link
Member

https://hub.docker.com/_/adoptopenjdk

DEPRECATED; use https://hub.docker.com/_/eclipse-temurin/

Might be worth checking out eclipse-temurin or another alternative

@zhumin8
Copy link
Contributor

zhumin8 commented Oct 21, 2021

Thanks for bringing this to our attention.

@chanseokoh chanseokoh changed the title adoptopenjdk base image is deprecated adoptopenjdk base image is deprecated and add support for Java 17 Oct 26, 2021
@chanseokoh
Copy link
Member

We should take this opportunity to add support for Java 17. (Basically, auto-detect Java 17 and use Temurin 17 as the default base image in that case.)

@Sineaggi
Copy link
Contributor

Temurin doesn't ship a 17 jre https://blog.adoptium.net/2021/10/jlink-to-produce-own-runtime/

@chanseokoh
Copy link
Member

That makes me sad. I wonder if we have to choose a different vendor for Java 17. Spring Boot (Paketo Buildpakcs) uses BellSoft Libercia.

@Sineaggi
Copy link
Contributor

I believe azul also still ships jres. Debian looks like they're still building their own jres as well.

Corretto doesn't look like they do. Microsoft builds of openjdk appear to be jdk only.

@chanseokoh
Copy link
Member

Azul Zulu is also a serious contender. I am leaning toward it for Java 17.

@chanseokoh
Copy link
Member

chanseokoh commented Nov 1, 2021

Another issue: currently ASM can't examine bytecode of newer Java versions, so this also needs to be taken care of. You can check a workaround in the linked Stack Overflow answer.

UPDATE: we have a dependabot upgrading versions, so the HEAD already has the ASM version that can handle Java 17 bytecode.

@Sineaggi
Copy link
Contributor

Sineaggi commented Nov 1, 2021

Perhaps we should create a new issue investigating if we can try/catch that issue and log possible solutions in the future. Solutions being upgrade jib if not on latest, consider reporting a bug

@chanseokoh
Copy link
Member

chanseokoh commented Nov 10, 2021

Going with eclipse-temurin for Java 8 and 11, and azul/zulu-openjdk for Java 17.

@chanseokoh
Copy link
Member

chanseokoh commented Nov 11, 2021

Fixed by #3491 and #3499.

UPDATE: also by #3552.

@racevedoo
Copy link

Actually temurin now ships JREs: https://blog.adoptium.net/2021/12/eclipse-temurin-jres-are-back/

@chanseokoh
Copy link
Member

@racevedoo oh, glad that they changed their mind. Thanks for letting us know.

@chanseokoh chanseokoh reopened this Jan 5, 2022
@chanseokoh
Copy link
Member

Fortunately, we haven't released the base image change (#3491). For consistency, we will use Temurin for Java 17 as well.

@FlorianAgilap
Copy link

Hello,
I was wondering if there was any expected date of release for the support of Java 17 by JIB ?
We upgraded our whole projet to Java 17 recently, and only just noticed that one of the subprojects relies on JIB. So a release date expectation would help us know whether we can just wait for it, find a workaround, rollback to Java 11 or anything...
Thanks in advance !

@chanseokoh
Copy link
Member

chanseokoh commented Jan 14, 2022

Just merged #3552, which will make Jib use Eclipse Temurin for all Java versions.

Will release a new version next week.

But if you have a build failure due to ASM, there is a workaround. If the problem is about Jib not automatically selecting a working base image for Java 17, you can always configure from.image yourself to point to any suitable JRE image (e.g., eclipse-temurin:17-jre).

@fblampe
Copy link

fblampe commented Jan 18, 2022

default_base_image.md (first sentence) still links to the deprecated AdoptOpenJdk image. It also mentions the project being renamed to Adoptium, but now it's already called Eclipse Temurin.

Should probably be updated to prevent confusion.

@chanseokoh
Copy link
Member

@fblampe the doc will be updated once there's a new release.

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

No branches or pull requests

8 participants