Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# OpenMessaging Benchmark Framework
# Fork of the OpenMessaging Benchmark Framework that uses sapmachine 17 docker image

This fork is used to update the outdated offical docker hub image openmessaging/openmessaging-benchmark with sapmachine:17.
Find more in [./docker/README.md](./docker/README.md).

[![Build](https://github.com/openmessaging/benchmark/actions/workflows/pr-build-and-test.yml/badge.svg)](https://github.com/openmessaging/benchmark/actions/workflows/pr-build-and-test.yml)
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
Expand Down Expand Up @@ -27,7 +30,7 @@ This repository houses user-friendly, cloud-ready benchmarking suites for the fo

Requirements:

* JDK 8
* JDK 17
* Maven 3.8.6+

Common build actions:
Expand Down
10 changes: 9 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,20 @@
# limitations under the License.
#

FROM openjdk:8-jdk
FROM eclipse-temurin:17

ARG BENCHMARK_TARBALL

# Using ADD instead of COPY because ${BENCHMARK_TARBALL} is an archive that needs to be extracted
ADD ${BENCHMARK_TARBALL} /

RUN mv openmessaging-benchmark-* /benchmark

WORKDIR /benchmark

# Install vim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y vim tzdata && rm -rf /var/lib/apt/lists/*

# Start a shell by default
CMD ["/bin/bash"]
13 changes: 10 additions & 3 deletions docker/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,21 @@
#

# Build the Project
FROM maven:latest as build
FROM maven:3.9.9-eclipse-temurin-17 as build
COPY . /benchmark
WORKDIR /benchmark
RUN mvn install

# Create the benchmark image
FROM openjdk:8-jdk
FROM eclipse-temurin:17
COPY --from=build /benchmark/package/target/openmessaging-benchmark-*-SNAPSHOT-bin.tar.gz /
RUN mkdir /benchmark && tar -xzf openmessaging-benchmark-*-SNAPSHOT-bin.tar.gz -C /benchmark --strip=1
RUN rm /openmessaging-benchmark-*-SNAPSHOT-bin.tar.gz
WORKDIR /benchmark
WORKDIR /benchmark

# Install vim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y vim tzdata && rm -rf /var/lib/apt/lists/*

# Start a shell by default
CMD ["/bin/bash"]
17 changes: 12 additions & 5 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
# OpenMessaging Benchmark Framework Docker

## Precondition

You need to install [Eclipse Temurin 17](https://adoptium.net/)
and set the JAVA_HOME environment variable to its installation directory.

## Building the image

You can use either of the Dockerfiles - `./docker/Dockerfile` or `./docker/Dockerfile.build` based on your needs.

### `Dockerfile`

Uses `openjdk-8` and takes `BENCHMARK_TARBALL` as an argument.
Uses `eclipse-temurin:17` and takes `BENCHMARK_TARBALL` as an argument.
While using this Dockerfile, you will need to build the project locally **first**.

```
#> mvn build
#> export BENCHMARK_TARBALL=package/target/openmessaging-benchmark-<VERSION>-SNAPSHOT-bin.tar.gz
#> docker build --build-arg BENCHMARK_TARBALL . -f docker/Dockerfile
#> docker build -t openmessaging-benchmark:latest --build-arg BENCHMARK_TARBALL . -f docker/Dockerfile
```

### `Dockerfile.build`

Uses the latest version of `maven` in order to build the project, and then use `openjdk-8` as runtime.
This Dockerfile has no dependency (you do not need Mavent to be installed locally).
Uses the latest version of `maven` in order to build the project, and then uses `eclipse-temurin:17` as runtime.
This Dockerfile has no dependency (you do not need Maven to be installed locally).

```
#> docker build . -f docker/Dockerfile.build
#> docker build -t openmessaging-benchmark:latest . -f docker/Dockerfile.build
```

Loading