DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Java vs. Go Microservices - Load Testing (Rematch)
  • The Evolution of Scalable and Resilient Container Infrastructure
  • Scaling Microservices With Docker and Kubernetes on Production
  • System Coexistence: Bridging Legacy and Modern Architecture

Trending

  • Can You Run a MariaDB Cluster on a $150 Kubernetes Lab? I Gave It a Shot
  • AI Speaks for the World... But Whose Humanity Does It Learn From?
  • The Evolution of Scalable and Resilient Container Infrastructure
  • Using Java Stream Gatherers To Improve Stateful Operations
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Testing, Tools, and Frameworks
  4. Introducing a Lightweight Apache JMeter Docker Image

Introducing a Lightweight Apache JMeter Docker Image

Are you looking for a lean, secure, and versatile Docker image for Apache JMeter to streamline your load testing workflows? Look no further!

By 
NaveenKumar Namachivayam user avatar
NaveenKumar Namachivayam
DZone Core CORE ·
Apr. 07, 25 · Tutorial
Likes (4)
Comment
Save
Tweet
Share
5.3K Views

Join the DZone community and get the full member experience.

Join For Free

Are you looking for a lean, secure, and versatile Docker image for Apache JMeter to streamline your load testing of workflows? Look no further! Today, I’m excited to share a new Dockerfile I’ve crafted that delivers a lightweight Apache JMeter image without compromising on functionality. Whether you’re a developer, DevOps engineer, or QA professional, this image is designed to make your performance testing faster, easier, and more efficient.

Why This JMeter Docker Image Stands Out

This isn’t your average JMeter setup. Here’s what makes this Docker image special:

  • Small and secure base: Built on Alpine Linux, known for its tiny footprint and security-first design.
  • Powered by Liberica JDK: Uses bellsoft/liberica-openjdk-alpine, a free, open-source Java runtime optimized for modern deployments.
  • Full JMeter functionality: Includes Apache JMeter for robust load testing, plus a handy script to install plugins as needed.
  • Non-root execution: Runs as the jmeter user for enhanced security — no unnecessary root privileges here.
  • Multi-architecture ready: Supports both amd64 (x86_64) and arm64 platforms, so it works seamlessly on everything from Intel-based servers to Apple M1/M2/M3 chips, AWS Graviton, or even a Raspberry Pi 4.
  • Optimized size: Thanks to multi-stage builds, the image is slim — 51.78 MB compressed and 209.71 MB uncompressed.

This combination of features ensures you get a lightweight, secure, and flexible JMeter environment that’s ready to tackle your testing needs.

Getting Started: Basic Usage

Building and running the image is a breeze. Here’s how to get going:

Clone this repo or simply use docker pull qainsights/jmeter command.

Build the Image

In the directory containing the Dockerfile, run:

Shell
 
docker build -t my-jmeter-image .


This creates an image tagged as my-jmeter-image.

Run JMeter

To execute a test, mount your test directory and specify your .jmx file:

Shell
 
docker run -v /path/to/your/test:/tests my-jmeter-image /tests/your-test.jmx


Replace /path/to/your/test with the local path to your test files and your-test.jmx with your test script’s filename. Done!

Multi-Architecture Support: Flexibility Across Platforms

One of the standout features of this image is its multi-architecture support. Whether you’re running on a traditional x86_64 machine or an ARM64 device like an Apple Silicon Mac or AWS Graviton instance, this image has you covered.

To build a multi-architecture image, use the provided build-multiarch.sh script:

Shell
 
# Make it executable
chmod +x build-multiarch.sh

# Check options
./build-multiarch.sh --help

# Build and push to your registry
./build-multiarch.sh --name jmeter --tag 5.6.3 --registry your-registry/ --push


The script is packed with options:

  • -n, --name: Set the image name (e.g., jmeter).
  • -t, --tag: Specify a version tag (e.g., 5.6.3).
  • -r, --registry: Define your Docker registry.
  • --push: Push the image to your registry after building.

This makes it easy to deploy JMeter across diverse environments without worrying about compatibility.

Advanced Usage: Customize Your Setup

Installing JMeter Plugins

Need specific plugins for your tests? You can add them directly in the Dockerfile. Just tweak the JMETER_PLUGINS argument with a comma-separated list:

Shell
 
ARG JMETER_PLUGINS="jpgc-udp=0.4,jpgc-dummy"


Want a specific version? Use =version-number. Otherwise, it’ll grab the latest.

Keeping It Lean

The image stays lightweight, thanks to some clever optimizations:

  1. Multi-stage builds: Dependencies are separated from the runtime, reducing bloat.
  2. File cleanup: Strips out unnecessary docs and Windows batch files.
  3. Cache management: Clears temporary files and package caches.
  4. Minimal plugins: Only what you need, nothing more.

These steps ensure you’re not hauling around extra weight, making your CI/CD pipelines or local runs faster.

Why Size Matters

At just 151.78 MB compressed, this image is significantly smaller than many JMeter setups, which often balloon past 500 MB. A smaller image means quicker downloads, faster deployments, and less resource overhead — perfect for scaling tests in the cloud or running locally on constrained hardware.

This project is open to contributions. Have an idea to make it even better? Found a bug? Feel free to submit a Pull Request on the repository. Let’s build something awesome together!

Final Thoughts

This lightweight Apache JMeter Docker image is all about efficiency, security, and flexibility. Whether you’re load testing a web app, API, or microservice, it’s got the tools you need in a package that won’t weigh you down. Give it a spin, tweak it to your liking, and let me know how it works for you!

Happy testing!

Apache JMeter Load testing Docker (software) Apache

Published at DZone with permission of NaveenKumar Namachivayam, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Java vs. Go Microservices - Load Testing (Rematch)
  • The Evolution of Scalable and Resilient Container Infrastructure
  • Scaling Microservices With Docker and Kubernetes on Production
  • System Coexistence: Bridging Legacy and Modern Architecture

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!