Skip to content

Commit 7a98d42

Browse files
authored
Merge PR #64 from typekpb/jmeter_5.5 - upgrade to 5.5
JMeter updated to version: 5.5
2 parents 6eee579 + 4e71a0c commit 7a98d42

File tree

5 files changed

+32
-32
lines changed

5 files changed

+32
-32
lines changed

.github/workflows/docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
id: prep
3535
run: |
3636
DOCKER_IMAGE=justb4/jmeter
37-
VERSION="5.4"
37+
VERSION="5.5"
3838
TAGS="${DOCKER_IMAGE}:${VERSION}"
3939
echo ::set-output name=image::${DOCKER_IMAGE}
4040
echo ::set-output name=version::${VERSION}

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM alpine:3.12
44

55
MAINTAINER Just van den Broecke<[email protected]>
66

7-
ARG JMETER_VERSION="5.4.3"
7+
ARG JMETER_VERSION="5.5"
88
ENV JMETER_HOME /opt/apache-jmeter-${JMETER_VERSION}
99
ENV JMETER_CUSTOM_PLUGINS_FOLDER /plugins
1010
ENV JMETER_BIN ${JMETER_HOME}/bin

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ TARGET_HOST ?= "example.com"
22
TARGET_PORT ?= "80"
33
THREADS ?= "1"
44
CONTAINER_NAME ?= "docker-jmeter"
5-
IMAGE = "justb4/jmeter:5.4"
5+
IMAGE = "justb4/jmeter:5.5"
66
TEST ?= trivial
77
JVM_ARGS ?= "-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m"
88
TARGET_PATH ?= "/index.html"

README.md

+28-28
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
## Image on Docker Hub
66

77
Docker image for [Apache JMeter](http://jmeter.apache.org).
8-
This Docker image can be run as the ``jmeter`` command.
8+
This Docker image can be run as the ``jmeter`` command.
99
Find Images of this repo on [Docker Hub](https://hub.docker.com/r/justb4/jmeter).
10-
Starting version 5.4 Docker builds/pushes
10+
Starting version 5.4 Docker builds/pushes
1111
are [executed via GitHub Workflows](.github/workflows/docker.yml).
1212

1313
## Donate
@@ -18,15 +18,15 @@ To support its active maintainance consider making a donation, for example via P
1818

1919

2020
## Security Patches
21-
As you may have seen in the news, a new zero-day exploit has been reported against the
22-
popular Log4J2 library which can allow an attacker to remotely execute code.
23-
The vulnerability has been reported with [CVE-2021-44228](https://nvd.nist.gov/vuln/detail/CVE-2021-44228)
21+
As you may have seen in the news, a new zero-day exploit has been reported against the
22+
popular Log4J2 library which can allow an attacker to remotely execute code.
23+
The vulnerability has been reported with [CVE-2021-44228](https://nvd.nist.gov/vuln/detail/CVE-2021-44228)
2424
against the log4j-core jar and has been fixed in Log4J v2.16.0.
2525

2626
JMeter, at least in versions 5 and later uses the vulnerable Log4J versions.
2727
The good news though is that the vulnerability applies only to remotely accessible Java web-services.
28-
JMeter is a commandline/GUI tool one runs internally. Still it is good practice to
29-
patch this problem.
28+
JMeter is a commandline/GUI tool one runs internally. Still it is good practice to
29+
patch this problem.
3030

3131
**JMeter has been updated to 5.4.2 for security CVE-2021-45046 & CVE-2021-45046**.
3232

@@ -64,7 +64,7 @@ This is a standard facility of JMeter: settings in a JMX test script
6464
may be defined symbolically and substituted at runtime via the commandline.
6565
These are called JMeter User Defined Variables or UDVs.
6666

67-
See [test.sh](test.sh) and the [trivial test plan](tests/trivial/test-plan.jmx) for an example of UDVs passed to the Docker
67+
See [test.sh](test.sh) and the [trivial test plan](tests/trivial/test-plan.jmx) for an example of UDVs passed to the Docker
6868
image via [run.sh](run.sh).
6969

7070
See also: https://www.novatec-gmbh.de/en/blog/how-to-pass-command-line-properties-to-a-jmeter-testplan/
@@ -83,8 +83,8 @@ All three use values in Megabyte range.
8383

8484
## Installing JMeter plugins
8585

86-
To run the container with custom JMeter plugins installed you need to mount a volume /plugins with the .jar files. For example:
87-
```sh
86+
To run the container with custom JMeter plugins installed you need to mount a volume /plugins with the .jar files. For example:
87+
```sh
8888
sudo docker run --name ${NAME} -i -v ${LOCAL_PLUGINS_FOLDER}:/plugins -v ${LOCAL_JMX_WORK_DIR}:${CONTAINER_JMX_WORK_DIR} -w ${PWD} ${IMAGE} $@
8989
```
9090

@@ -116,15 +116,15 @@ Contribution by @wilsonmar
116116
./build.sh
117117
```
118118

119-
If you view this file, the <strong>docker build</strong> command within the script is for a specific version of JMeter and implements the <strong>Dockerfile</strong> in the same folder.
120-
119+
If you view this file, the <strong>docker build</strong> command within the script is for a specific version of JMeter and implements the <strong>Dockerfile</strong> in the same folder.
120+
121121
If you view the Dockerfile, notice the `JMETER_VERSION` specified is the same as the one in the build.sh script. The FROM keyword specifies the Alpine operating system, which is very small (less of an attack surface). Also, no JMeter plug-ins are used.
122-
122+
123123
At the bottom of the Dockerfile is the <strong>entrypoint.sh</strong> file. If you view it, that's where JVM memory settings are specified for <strong>jmeter</strong> before it is invoked. PROTIP: Such settings need to be adjusted for tests of more complexity.
124124

125125
The last line in the response should be:
126-
127-
<tt>Successfully tagged justb4/jmeter:5.4</tt>
126+
127+
<tt>Successfully tagged justb4/jmeter:5.5</tt>
128128

129129
1. Run the test script:
130130

@@ -133,7 +133,7 @@ Contribution by @wilsonmar
133133
```
134134

135135
If you view the script, note it invokes the <strong>run.sh</strong> script file stored at the repo's root. View that file to see that it specifies docker image commands.
136-
136+
137137
File and folder names specified in the test.sh script is reflected in the last line in the response for its run:
138138

139139
<pre>
@@ -151,24 +151,24 @@ Contribution by @wilsonmar
151151
THREADS=10 \
152152
TEST=trivial \
153153
make
154-
```
154+
```
155155

156156
1. Switch to your machine's Folder program and navigate to the folder containing files which replaces files cloned in from GitHub:
157-
157+
158158
```
159159
cd tests/trivial
160160
```
161-
161+
162162
The files are:
163-
163+
164164
* jmeter.log
165165
* reports folder (see below)
166166
* test-plan.jmx containing the JMeter test plan.
167167
* test-plan.jtl containing statistics from the run displayed by the index.html file.
168-
169-
168+
169+
170170
1. Navigate into the <strong>report</strong> folder and open the <strong>index.html</strong> file to pop up a browser window displaying the run report. On a Mac Terminal:
171-
171+
172172
```
173173
cd report
174174
open index.html
@@ -181,13 +181,13 @@ Contribution by @wilsonmar
181181

182182
## Specifics
183183

184-
The Docker image built from the
184+
The Docker image built from the
185185
[Dockerfile](Dockerfile) inherits from the [Alpine Linux](https://www.alpinelinux.org) distribution:
186186

187-
> "Alpine Linux is built around musl libc and busybox. This makes it smaller
188-
> and more resource efficient than traditional GNU/Linux distributions.
189-
> A container requires no more than 8 MB and a minimal installation to disk
190-
> requires around 130 MB of storage.
187+
> "Alpine Linux is built around musl libc and busybox. This makes it smaller
188+
> and more resource efficient than traditional GNU/Linux distributions.
189+
> A container requires no more than 8 MB and a minimal installation to disk
190+
> requires around 130 MB of storage.
191191
> Not only do you get a fully-fledged Linux environment but a large selection of packages from the repository."
192192
193193
See https://hub.docker.com/_/alpine/ for Alpine Docker images.

build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
JMETER_VERSION=${JMETER_VERSION:-"5.4"}
3+
JMETER_VERSION=${JMETER_VERSION:-"5.5"}
44
IMAGE_TIMEZONE=${IMAGE_TIMEZONE:-"Europe/Amsterdam"}
55

66
# Example build line

0 commit comments

Comments
 (0)