Skip to content

Updated Docker build files so they are working again #431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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 sapmachine: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=2:9.1.0016-1ubuntu7.8 tzdata=2025b-0ubuntu0.24.04 && 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-sapmachine-17 as build
COPY . /benchmark
WORKDIR /benchmark
RUN mvn install

# Create the benchmark image
FROM openjdk:8-jdk
FROM sapmachine: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=2:9.1.0016-1ubuntu7.8 tzdata=2025b-0ubuntu0.24.04 && rm -rf /var/lib/apt/lists/*

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

## Precondition

You need to install [sapmachine 17](https://sapmachine.io/)
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 `sapmachine:17` and takes `BENCHMARK_TARBALL` as an argument.
While using this Dockerfile, you will need to build the project locally **first**.

```
Expand All @@ -15,8 +22,8 @@ While using this Dockerfile, you will need to build the project locally **first*

### `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 use `sapmachine:17` as runtime.
This Dockerfile has no dependency (you do not need Maven to be installed locally).

```
#> docker build . -f docker/Dockerfile.build
Expand Down