-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile.jmeter
50 lines (41 loc) · 2.56 KB
/
Dockerfile.jmeter
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM adoptopenjdk:8-jre-hotspot
ENV JMETER_VERSION 3.1
# Install pre-requisite packages
RUN apt-get update && apt-get install -y --no-install-recommends wget unzip \
&& rm -rf /var/lib/apt/lists/*
RUN JMETER_FILE="apache-jmeter-3.1.tgz" \
&& wget -q -O /tmp/apache-jmeter.tgz https://archive.apache.org/dist/jmeter/binaries/${JMETER_FILE} \
&& ESUM="e697a17ef47f645c81f02c8f98f56400e2a182fa580904d329a0d277935edeec" \
&& echo "${ESUM} /tmp/apache-jmeter.tgz" | sha256sum -c - \
&& tar -xf /tmp/apache-jmeter.tgz \
&& mv apache-jmeter-3.1 /opt/jmeter \
&& JSON_SIMPLE_URL="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/json-simple" \
&& JSON_SIMPLE_VER="json-simple-1.1.1.jar" \
&& wget -q -O /tmp/json-simple-1.1.1.jar ${JSON_SIMPLE_URL}/${JSON_SIMPLE_VER} \
&& JSUM="108045c9675ebf6d6ec4d8dcc331693f9b944ac7c87de52dccff2c55e8dfa6f1" \
&& echo "${JSUM} /tmp/json-simple-1.1.1.jar" | sha256sum -c - \
&& mv /tmp/json-simple-1.1.1.jar /opt/jmeter/lib/ext \
&& JMETER_PLUGINS_URL="https://repo1.maven.org/maven2/kg/apc/jmeter-plugins-manager/0.16/jmeter-plugins-manager-0.16.jar" \
&& wget -q -O /tmp/jmeter-plugins-manager-0.16.jar ${JMETER_PLUGINS_URL} \
&& PSUM="fe83b2977dfd84e3871af86f8c5155723a0ceaef4fa676d3fe36b26a2923f9f7" \
&& echo "${PSUM} /tmp/jmeter-plugins-manager-0.16.jar" | sha256sum -c - \
&& mv /tmp/jmeter-plugins-manager-0.16.jar /opt/jmeter/lib/ext \
&& JMETER_WEB_SOCKET="https://bitbucket.org/pjtr/jmeter-websocket-samplers/downloads/JMeterWebSocketSamplers-0.11.1.jar" \
&& wget -q -O /tmp/JMeterWebSocketSamplers-0.11.1.jar ${JMETER_WEB_SOCKET} \
&& WSUM="41d8c634c4b3cef023ba6a9ef57e2dd0cb8b9d1d4669387f2de35e89cf77f372" \
&& echo "${WSUM} /tmp/JMeterWebSocketSamplers-0.11.1.jar" | sha256sum -c - \
&& mv /tmp/JMeterWebSocketSamplers-0.11.1.jar /opt/jmeter/lib/ext \
&& rm -f /tmp/apache-jmeter.tgz
# Set jmeter home
ENV JMETER_HOME /opt/jmeter
# Add jmeter to the PATH
ENV PATH ${JMETER_HOME}/bin:${PATH}
# We should set summariser.interval=6 in bin/jmeter.properties
RUN echo 'summariser.interval=6' >> ${JMETER_HOME}/bin/jmeter.properties
# Copy the script to be executed and other needed files
COPY jmeter-driver/acmeair-jmeter/build/libs/acmeair-jmeter-*-SNAPSHOT.jar /opt/jmeter/lib/ext
COPY jmeter-driver/applyLoad.sh ${JMETER_HOME}/bin/applyLoad.sh
RUN chmod u+x ${JMETER_HOME}/bin/applyLoad.sh
# Environment variables that we want the user to redefine
ENV JHOST=localhost JPORT=32221 JUSERS=15 JDURATION=60
ENTRYPOINT ["applyLoad.sh"]