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 support devfile stack #210

Open
NickWemekamp opened this issue Feb 22, 2022 · 3 comments
Open

Java 17 support devfile stack #210

NickWemekamp opened this issue Feb 22, 2022 · 3 comments

Comments

@NickWemekamp
Copy link

Hi,

Are there plans to support Java 17 as well as Java 11 for the devfile-stack image? Because there are now official JDK 17 images available for Open Liberty but it looks open-liberty-devfile-stack:22.0.0.1 is using Java 11 only.
Maybe we can have one devfile stack image with multiple JDK's installed or have a seperate image for JDK 17.

@scottkurz
Copy link
Member

@NickWemekamp , we haven't decided yet but yes Java 17 is on our radar.

The devfile support is still in the early release stage. If it would help you to explore devfiles with Open Liberty and Java 17 at this early stage, we could provide some guidance to help walk you through that.

The function of the stack image is primarily for caching, to help the development pod start more quickly, and to speed up the eventual "outer loop" build as well. It's not exactly required though.

Feel free to let us know and thanks for your question.

@NickWemekamp
Copy link
Author

@scottkurz Thanks for the fast reply.

We don't need Java 17 for the devfile stack image right now so we will wait it out. But I appreciate the offer! And I can always extend the dev image and add JDK17 manually or use a maven-jdk17 image without Open Liberty preinstalled as a workaround.

@scottkurz
Copy link
Member

scottkurz commented Feb 22, 2022

@scottkurz Thanks for the fast reply.

We don't need Java 17 for the devfile stack image right now so we will wait it out. But I appreciate the offer! And I can always extend the dev image and add JDK17 manually or use a maven-jdk17 image without Open Liberty preinstalled as a workaround.

Sure, glad to help.

ADJUSTING DEVFILE TO USE EXISTING IMAGE

I'll just mention quick anyway, the simplest way to pick up Java 17 would be to just reference a well-known image with Maven built in, e.g.: maven:eclipse-temurin at Docker Hub.

If you did this you'd want to remove the -DinstallDirectory=/opt/ol/wlp in each devfile 'mvn' command, since there's no pre-cached Open Liberty install to reference.

BUILDING YOUR OWN STACK IMAGE

Another, (a bit more complicated) approach would be to build your own stack image.

If you go this route, cloning/forking this repo and trying to run the same scripts we use would be unnecessary. (E.g. a typical user has no need to build both an Open Liberty AND a WebSphere Liberty image but just one or the other).

A simpler approach is just to start from the stack image Dockerfile at path: stack/open-liberty/image/maven/Dockerfile, modify it, build/push, update devfile, etc.

stack/open-liberty/image/maven/Dockerfile

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

2 participants