Skip to content

Commit

Permalink
Update base image
Browse files Browse the repository at this point in the history
  • Loading branch information
yaalsn authored Nov 11, 2024
1 parent 830cdbe commit a886e7d
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions docker/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,8 @@ WORKDIR /benchmark
RUN mvn install -DskipTests

# Create the benchmark image
FROM ubuntu:22.04

ARG DEBIAN_FRONTEND=noninteractive
ARG UBUNTU_MIRROR=mirror://mirrors.ubuntu.com/mirrors.txt
ARG UBUNTU_SECURITY_MIRROR=http://security.ubuntu.com/ubuntu/

# Install some utilities
RUN sed -i -e "s|http://archive\.ubuntu\.com/ubuntu/|${UBUNTU_MIRROR:-mirror://mirrors.ubuntu.com/mirrors.txt}|g" \
-e "s|http://security\.ubuntu\.com/ubuntu/|${UBUNTU_SECURITY_MIRROR:-http://security.ubuntu.com/ubuntu/}|g" /etc/apt/sources.list \
&& echo 'Acquire::http::Timeout "30";\nAcquire::ftp::Timeout "30";\nAcquire::Retries "3";' > /etc/apt/apt.conf.d/99timeout_and_retries \
&& apt-get update \
&& apt-get -y dist-upgrade \
&& apt-get -y install netcat dnsutils less procps iputils-ping \
curl ca-certificates wget apt-transport-https \
&& apt-get -y install --no-install-recommends python3 python3-kazoo python3-pip

RUN mkdir -p /etc/apt/keyrings \
&& wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | tee /etc/apt/keyrings/adoptium.asc \
&& echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list \
&& apt-get update \
&& apt-get -y dist-upgrade \
&& apt-get -y install temurin-17-jdk \
&& export ARCH=$(uname -m | sed -r 's/aarch64/arm64/g' | awk '!/arm64/{$0="amd64"}1') \
&& echo networkaddress.cache.ttl=1 >> /usr/lib/jvm/temurin-17-jdk-$ARCH/conf/security/java.security \
&& echo networkaddress.cache.negative.ttl=1 >> /usr/lib/jvm/temurin-17-jdk-$ARCH/conf/security/java.security
FROM alpine:latest
RUN apk update && apk add mvn curl vim

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
Expand Down

0 comments on commit a886e7d

Please sign in to comment.