Last active
November 15, 2019 15:45
-
-
Save lampidudelj/7181f2ed0fb13bf05893478908e223f9 to your computer and use it in GitHub Desktop.
Base dockerfile for container running JMeter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM openjdk:8u201-jdk-alpine3.9 | |
LABEL mantainer="" | |
STOPSIGNAL SIGKILL | |
ENV MIRROR https://www-eu.apache.org/dist/jmeter/binaries | |
ENV JMETER_VERSION 5.2 | |
ENV JMETER_HOME /opt/apache-jmeter-${JMETER_VERSION} | |
ENV JMETER_BIN ${JMETER_HOME}/bin | |
ENV ALPN_VERSION 8.1.13.v20181017 | |
ENV PATH ${JMETER_BIN}:$PATH | |
RUN apk add --no-cache \ | |
curl \ | |
fontconfig \ | |
net-tools \ | |
shadow \ | |
su-exec \ | |
tcpdump \ | |
ttf-dejavu \ | |
&& cd /tmp/ \ | |
&& curl --location --silent --show-error --output apache-jmeter-${JMETER_VERSION}.tgz ${MIRROR}/apache-jmeter-${JMETER_VERSION}.tgz \ | |
&& curl --location --silent --show-error --output apache-jmeter-${JMETER_VERSION}.tgz.sha512 ${MIRROR}/apache-jmeter-${JMETER_VERSION}.tgz.sha512 \ | |
&& sha512sum -c apache-jmeter-${JMETER_VERSION}.tgz.sha512 \ | |
&& mkdir -p /opt/ \ | |
&& tar x -z -f apache-jmeter-${JMETER_VERSION}.tgz -C /opt \ | |
&& rm -R -f apache* \ | |
&& sed -i '/RUN_IN_DOCKER/s/^# //g' ${JMETER_BIN}/jmeter \ | |
&& sed -i '/PrintGCDetails/s/^# /: "${/g' ${JMETER_BIN}/jmeter && sed -i '/PrintGCDetails/s/$/}"/g' ${JMETER_BIN}/jmeter \ | |
&& chmod +x ${JMETER_HOME}/bin/*.sh \ | |
&& jmeter --version \ | |
&& curl --location --silent --show-error --output /opt/alpn-boot-${ALPN_VERSION}.jar http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/${ALPN_VERSION}/alpn-boot-${ALPN_VERSION}.jar \ | |
&& rm -fr /tmp/* | |
#custom envronment settings file | |
COPY setenv.bat ${JMETER_BIN} | |
RUN chmod +x ${JMETER_BIN}/setenv.bat | |
# Required for HTTP2 plugins | |
ENV JVM_ARGS -Xbootclasspath/p:/opt/alpn-boot-${ALPN_VERSION}.jar | |
WORKDIR /jmeter | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment