bell-sw / Liberica

Free and 100% open source Progressive Java Runtime for modern Java™ deployments supported by a leading OpenJDK contributor
https://bell-sw.com/pages/libericajdk/
GNU General Public License v2.0
295 stars 28 forks source link

Docker images not containing JavaFX #84

Open nicolabeghin opened 2 years ago

nicolabeghin commented 2 years ago

Hi everyone I see that JavaFX is excluded from Docker images - checked JDK 11 and 17, both on Alpine/Debian/CentOS.

ref. https://github.com/bell-sw/Liberica/blob/master/docker/repos/liberica-openjdk-debian/17/Dockerfile#L155

MODS=$( ls ${UNPACKED_ROOT}/jmods/          \
      | sed "s/.jmod//"                     \
      | grep -v javafx                      \
      | tr '\n' ', '                        \
      | sed "s/,$//")                       \

Any reason behind this?

thanks nicola

nicolabeghin commented 2 years ago

If useful, here's a small bash script to build Liberica Docker images with javafx enabled, based on original Liberica-provided Dockerfile

https://github.com/nicolabeghin/liberica-openjdk-with-javafx

voitylov commented 1 year ago

thanks for sharing, the Dockerfiles are provided exactly for the purpose of making such customizations possible.

Our major focus is on keeping the base Liberica image size small, thus we currently do not plan to include FX in the base Liberica image.

It would be interesting to understand the specific use case for JDK with FX inside docker images, if we may be underestimating how wide-spread such a use case is.

nicolabeghin commented 1 year ago

Thanks, my use case is to build desktop JavaFX apps in the existing CI/CD tool (Gitlab in this case).

Goldenflamer commented 1 year ago

This would be really needed and it is not a big thing to add. Adding an environment variable that triggers if the "-full" String is attached to the download path is all that is needed to support JavaFX in docker.

Many applications need this in CI pipelines etc.

For example, the only thing changing would be from this URL: https://download.bell-sw.com/java/8u362+9/bellsoft-jre8u362+9-linux-amd64.tar.gz to this URL https://download.bell-sw.com/java/8u362+9/bellsoft-jre8u362+9-linux-amd64**-full**.tar.gz

via an optional environment variable in the Dockerfile for every tag.