Closed snemarch closed 4 years ago
Today, Wiremock is designed around Java 8 API, no need to upgrade the Java version in Docker image.
Feel free to fork my project to adapt it for your purposes.
Well, "no need to upgrade the Java version in Docker image" – I definitely agree that there's no reason to change ´latest´ and ´latest-alpine´ from 8 to 11, updating the Java version in and by itself brings no value to most people.
But there's real use-cases for having additional tags for LTS Java versions: the current Java 8 version of your image cannot load extensions compiled with Java 11, and Java 8 is pretty much end-of-life.
I can fork your repo, but IMHO it's a shame to create unnecessary divergence. I would be happy to do a PR that supports both 8 and 11 :)
In fact, this repository only handles the Wiremock Docker image build and deployment based on the official Wiremock repository specifications (including java version). I want to stay coherent with the official repository to avoid introducing potential integration issues.
For Apple M1 chips, the open-jre 8 does not have an ARM image yet. open-jre 11 does. So another reason to upgrade ;)
Java 9 and up have better support for containers, regarding memory usage. Java 11 (or now 17 LTS) should be able to run Java 8 compiled code just fine
I ran into this as well. Use the new image: https://github.com/wiremock/wiremock-docker Includes an upgrade to Java 11 https://github.com/wiremock/wiremock-docker/commit/39d8e0ebd26f55b3ff5b4e9ff48192dc183e7d22
Would it be possible to add JRE11 based versions?
I see the previously closed PRs about JRE11 (#29, #30 and #31), but there's a valid usecase: extensions. I'm in the process of upgrading a codebase from Java 8 to 11, and it would be sort of messy having to compile the extensions we use with 8 while the main codebase goes to 11 :)
I believe it should be added as new tags, rather than changing
latest
andlatest-alpine
to 11 – since Docker added support for ARG in FROM statements, it should be possible to support both 8 and 11 without causing an explosion in the number of Dockerfiles.There's a couple of potential issues with JRE11, though: there's no Alpine version of OpenJDK 11, so the image would have to based on e.g. AdoptOpenJDK or zulu. And 11 is somewhat larger than 8 – for instance,
azul/zulu-openjdk-alpine:11-jre
weighs in at 181MB.