justb4 / docker-jmeter

Docker image for Apache JMeter
MIT License
275 stars 312 forks source link

Increase or support multiple Java versions #59

Open rfscholte opened 2 years ago

rfscholte commented 2 years ago

docker-jmeter 5.4 still depends on Java 8. Assuming most want to rely on LTS versions, both Java 11 and 17 are available for some time. I haven't been able to upgrade Java using https://docs.docker.com/develop/develop-images/multistage-build/ yet, it seems quite hard. (we're using a JMS driver that requires Java 11, hence this is a blocker)

Also I wonder why this image doesn't use any JDK as base, that would at least offer the opportunity to make this docker image reproducible.

As inspiration you might want to have a look at https://github.com/carlossg/docker-maven

rfscholte commented 2 years ago

Current solution:

FROM justb4/jmeter:5.4 as jmeter

FROM openjdk:11.0.13-jre-slim

# use JMETER_VERSION from justb4/jmeter
ENV JMETER_HOME /opt/apache-jmeter-5.4.3

COPY --from=jmeter ${JMETER_HOME} ${JMETER_HOME}