Sign inSign up

mosaicgreifswald/jmeter

By mosaicgreifswald

•Updated 10 days ago

Image
1

1.7K

mosaicgreifswald/jmeter repository overview

⁠Der jMeter-Layer
⁠1 Allgemeines

This layer is only used to automatically execute tests without a GUI. The layer can be created to generate a separate jMeter image, which is integrated via Docker-Compose, or a complete test image, which is based on a wildfly-db image.

⁠Relevant ENV Variables
CategoryVaraibleAvailable values or schemeDefault
LoggingJMETER_LOG_TO_FILEERROR, WARN, INFO, DEBUG, TRACEINFO
LoggingJMETER_LOG_LEVELTRUE, FALSEFALSE
OptimizingGC_ALGO<STRING>-XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20
OptimizingHEAP<STRING>-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m
⁠Relevant Entrypoints
Pathref. ENV-VariableTypePurpose
/entrypoint-logsENTRY_LOGSfolderAll further layers can store their own log files here in subdirectories.
/entrypoint-java-cacertsENTRY_JAVA_CACERTSfileThe entrypoint can be used to store its own cacerts, e.g. containing public-keys of server-certificates for specific web requests.
/entrypoint-jmeter-testfilesENTRY_JMETER_TESTSDirectoryAll JMX files that are to be started via jMeter are stored here.
/entrypoint-jmeter-propertiesENTRY_JMETER_PROPERTIESDirectoryIn addition, the properties files that are relevant for the start and correct execution of the tests can be stored here.
/entrypoint-jmeter-logsENTRY_JMETER_LOGSSymlink to /entrypoint-logs/jmeterAll logs generated by jMeter are stored here.

⁠Usage Docker

# build jmeter-image (required java-image mosaicgreifswald/zulujre:21)
> git clone https://github.com/mosaic-hgw/Docker.git
> cd mosaic-hgw/Docker/image/jmeter
> docker build --tag="mosaicgreifswald/jmeter" .

# "versions" shows all installed tools and components, with their versions
> docker run --rm mosaicgreifswald/jmeter versions
  last updated               : 2025-07-22 11:07:44
  Architecture               : x86_64
  Distribution               : Debian GNU/Linux 12.11
  zulu-jre                   : 21.0.8
  jMeter                     : 5.6.3
  jMeter-Plugins             : 1.4.0
  java-json                  : 20250517
  jmeter-prometheus-plugin   : 0.7.1
  
# "entrypoints" lists all registered entrypoints
> docker run --rm mosaicgreifswald/jmeter entrypoints
  ENTRY_LOGS                 : /entrypoint-logs
  ENTRY_JAVA_CACERTS         : /entrypoint-java-cacerts
  ENTRY_JMETER_TESTS         : /entrypoint-jmeter-testfiles
  ENTRY_JMETER_PROPERTIES    : /entrypoint-jmeter-properties
  ENTRY_JMETER_LOGS          : /entrypoint-jmeter-logs

# simple start with your test- and optional property-files, as well as locally stored logs
> docker run --rm -it \
    -v /path/to/your/jmx-files:/entrypoint-jmeter-testfiles \
    -v /path/to/your/property-files:/entrypoint-jmeter-properties \
    -v /path/to/your/logs:/entrypoint-jmeter-logs \
    mosaicgreifswald/jmeter

⁠Change write permissions

If data is stored on the host-system (via volume), it is created by default with the internal mosaic-user (UID:GID = 1111:1111). Accordingly, the writable directories on the host-system must be unlocked for the mosaic-user.

# at host-system
chown -R 1111:1111 logs
⁠The alternative, change write-user

You can change the write-user by using the Docker parameter --user/-u.

# change write-user (UID:GID) for writable volumes like logs/
> docker run --rm -d \
    -u 1006:1001 \
    -e JMETER_LOG_TO_FILE=FILE \
    -v /path/to/your/logs:/entrypoint-jmeter-logs \
    mosaicgreifswald/jmeter

> ls -la /path/to/your/logs
insgesamt 8
drwxr-xr-x  2 1006 1001 4096 13. Jun 10:25 .
drwxrwxrwt 10 root root 4096 13. Jun 10:26 ..
-rw-r--r--  1 1006 1001    0 13. Jun 10:25 jmeter.log
-rw-r--r--  2 1006 1001 4096 13. Jun 10:25 stdout.log

⁠Usage with Docker compose

# docker-compose.yml
services:
  application:
    image: yourcompany/application
    ports:
      - 8080:8080
  jmeter:
    image: mosaicgreifswald/jmeter
    depends_on:
      - application
    env_file:
      - ./envs/jmeter.env
    environment:
      MOS_WAIT_FOR_PORTS: application:8080
    volumes:
      - ./jmeter-tests:/entrypoint-jmeter-testfiles
      - ./jmeter-props:/entrypoint-jmeter-properties
      - ./logs:/entrypoint-jmeter-logs

⁠Additional files

# explore all additional files
> docker run --rm -it mosaicgreifswald/jmeter examples

# explore and copy interesting files to your local host
> docker run --rm -itv "/your/local/path/:/tmp/" mosaicgreifswald/jmeter examples --target-dir /tmp

# or copy directly all files to your host
> docker run --rm -v "/your/local/path/:/tmp/" mosaicgreifswald/jmeter examples --copy-all --target-dir /tmp"

You will receive the following directory-tree and can start playing immediately:

├─┬─ layer-readme/
│ ├─── README-debian.md
│ ├─── README-jmeter.md
│ └─── README-zulujre.md
└─┬─ examples/
  ├─┬─ compose-jmeter-empty/
  │ ├─┬─ envs/
  │ │ └─── jmeter.env
  │ ├─┬─ jmeter-tests/
  │ │ └─── wildfly-test.jmx
  │ ├─┬─ jmeter-props/
  │ │ └─── test.properties
  │ ├─── logs/
  │ └─── docker-compose.yml
  └─┬─ pure-envs/
    ├─── debian.env
    ├─── jmeter.env
    └─── zulujre.env

⁠Current Software-Versions on this Image

DateTagsChanges
2025-07-22



5.6.3⁠, 5⁠, latest⁠ (Dockerfile⁠)



Debian 12.11 "bookworm"
openJRE 21.0.8
java-json 20250517
MySQL-Connector 9.4.0
2025-01-13



5.6.3 (Dockerfile⁠)



Debian 12.9 "bookworm"
openJRE 21.0.5
java-json 20250107
MySQL-Connector 9.1.0
2024-07-22


5.6.3 (Dockerfile⁠)


Debian 12.6 "bookworm"
openJRE 21.0.4
MySQL-Connector 8.4.0
2024-03-05

5.6.3 (Dockerfile⁠)

Debian 12.5 "bookworm"
MySQL-Connector 8.3.0

Tag summary

Content type

Image

Digest

sha256:353dda07e…

Size

201.1 MB

Last updated

10 days ago

docker pull mosaicgreifswald/jmeter