adamkewley / jobson

A platform for transforming command-line applications into a job service.
Apache License 2.0
256 stars 20 forks source link

docker jdk11 #90

Closed isaacnugroho closed 1 year ago

isaacnugroho commented 2 years ago

Hi, I would like to contribute to jobson.

I wanted to use jobson for running java 11 application and unfortunately the existing image is using java 8. And I also wanted the smaller docker image, as for me, I do not need features from ubuntu.

So, after playing around a bit, I came up with an azul/zulu-open-jdk-alpine:11 based docker running jobson, and added to jobson project as jobson-docker-jdk11 sub-module.

Hopefully this PR can help others with similar requirements.

adamkewley commented 2 years ago

Thanks a lot for this :)

I'll need to read into it a little bit more before deciding on whether to merge it or not. One concern that I have is that you're specifically packaging a commercial distribution of OpenJDK (azul), rather than relying on a basic base image (e.g. alpine Linux with OpenJDK installed).

One other thing would be to figure out how to fully package Jobson without an external dependency on Java. I can see how it's a PITA to have to use a particular version of Java (because Jobson uses, say, 8), but I don't think it's a good long-term strategy to work around that PITA by distributing multiple versions of Jobson for various versions of Java. Ultimately, Java is an only an implementation detail of Jobson. Users shouldn't have to worry about it. So it might be that the best solution is to throw a particular Java distro in-package to prevent this issue.

0xF4CED commented 1 year ago

One concern that I have is that you're specifically packaging a commercial distribution of OpenJDK (azul), rather than relying on a basic base image (e.g. alpine Linux with OpenJDK installed).

The official adoptopenjdk image docker.io/adoptopenjdk/openjdk11:alpine-jre could be used as a non-commercial replacement. Alternatively, the docker.io/alpine base image could be used with the openjdk11-jre-headless package available from the alpine repo. Both alternatives provide the additional benefit of being significantly slimmer than azul/zulu-open-jdk-alpine:11 because they only ship the JRE.