Skip to contentSkip to conversation

rteval: Add interactive source-to-image Dockerfile

PATCH In review Chris White 2 participants 2 messages Dec 4, 2023 – Jan 23, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rteval: Add interactive source-to-image Dockerfile

This Dockerfile sets up a base image for rteval, copies the code, and installs it, providing an interactive container for testing rteval directly.

---
 .dockerignore |  1 +
 Dockerfile    | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+)
 create mode 100644 .dockerignore
 create mode 100644 Dockerfile
.dockerignore new file +1 -0
new file mode 100644
index 0000000..2d2ecd6
@@ -0,0 +1 @@
+.git/
Dockerfile new file +69 -0

69 lines not on this page · raw message

Signature · 1 line
2.31.1
#1 lore raw
Quoted 85 lines · Chris White

This Dockerfile sets up a base image for rteval, copies the code, and installs it, providing an interactive container for testing rteval directly.

---
 .dockerignore |  1 +
 Dockerfile    | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+)
 create mode 100644 .dockerignore
 create mode 100644 Dockerfile
.dockerignore new file +1 -0
new file mode 100644
index 0000000..2d2ecd6
@@ -0,0 +1 @@
+.git/
Dockerfile new file +59 -0
new file mode 100644
index 0000000..45f6434
@@ -0,0 +1,69 @@
+# Use CentOS Stream 9 as base image
+FROM centos:stream9
+
+ARG KERNEL_VERSION=linux-6.6.1.tar.xz
+
+
+# Copy current directory to /opt/rteval/
+COPY . /opt/rteval/
+
+# Install everything in one layer to shrink the image size
+# 1: Install needed dependencies and pull kernel source
+# 2: install rteval and fix bad symlink
+# 3: Remove uneeded packages and shrink the image
+RUN dnf -y update && \
+    dnf install -y \
+        python3-devel \
+        python3-lxml \
+        python3-libxml2 \
+        python3-dmidecode \
+        python3-requests \
+        realtime-tests \
+        sysstat \
+        xz \
+        bzip2 \
+        tar \
+        gzip \
+        m4 \
+        make \
+        gawk \
+        kernel-headers \
+        sos \
+        numactl \
+        gcc \
+        binutils \
+        gcc-c++ \
+        flex \
+        bison \
+        bc \
+        elfutils \
+        elfutils-libelf-devel \
+        openssl \
+        openssl-devel \
+        stress-ng \
+        perl-interpreter \
+        perl-devel \
+        perl-generators \
+        libmpc \
+        libmpc-devel \
+        dwarves \
+        wget \
+        procps-ng && \
+    cd /opt/rteval && \
+    wget -P loadsource https://www.kernel.org/pub/linux/kernel/v6.x/${KERNEL_VERSION} && \
+    make install && \
+    make clean && \
+    rm -f /usr/local/bin/rteval && \
+    ln -s /opt/rteval/rteval-cmd /usr/bin/rteval && \
+    dnf remove -y \
+        gcc-c++ \

Dockerfile line 69

Quoted 10 lines
Dockerfile new file +10 -0
+        python3-devel \
+        perl-devel && \
+    dnf clean all
+
+
+# Set the working directory to /root
+WORKDIR /root
+
+# Set the entrypoint to a shell
+ENTRYPOINT ["/bin/bash"]