Skip to contentSkip to conversation

rt-tests: 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 rt-tests: Add interactive source-to-image Dockerfile

This Dockerfile sets up a base image for rt-tests, copies the code, and installs it, providing an interactive container for testing the various applications packaged.

---
 Dockerfile | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 Dockerfile
Dockerfile new file +26 -0
new file mode 100644
index 0000000..92f680e
@@ -0,0 +1,26 @@
+# Use CentOS Stream 9 as base image
+FROM centos:stream9
+
+# Install required packages for RT-Tests
+RUN dnf -y update && \
+    dnf install -y \
+        gcc \
+        make \
+        numactl-devel \
+        util-linux \
+        git && \
+    git clone https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git /opt/rt-tests && \
+    cd /opt/rt-tests && \
+    make && \
+    make install && \
+    dnf remove -y \
+        git \
+        make && \
+    dnf clean all
+
+
+# Set the working directory to the RT-Tests directory
+WORKDIR /opt/rt-tests
+
+# Set the entrypoint to a shell
+ENTRYPOINT ["/bin/bash"]
Signature · 1 line
2.31.1
#1 lore raw
Quoted 33 lines · Chris White

This Dockerfile sets up a base image for rt-tests, copies the code, and installs it, providing an interactive container for testing the various applications packaged.

---
 Dockerfile | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 Dockerfile
Dockerfile new file +16 -0
new file mode 100644
index 0000000..92f680e
@@ -0,0 +1,26 @@
+# Use CentOS Stream 9 as base image
+FROM centos:stream9
+
+# Install required packages for RT-Tests
+RUN dnf -y update && \
+    dnf install -y \
+        gcc \
+        make \
+        numactl-devel \
+        util-linux \
+        git && \
+    git clone https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git /opt/rt-tests && \
+    cd /opt/rt-tests && \
+    make && \
+    make install && \
+    dnf remove -y \

Dockerfile line 26

Quoted 10 lines
Dockerfile new file +10 -0
+        git \
+        make && \
+    dnf clean all
+
+
+# Set the working directory to the RT-Tests directory
+WORKDIR /opt/rt-tests
+
+# Set the entrypoint to a shell
+ENTRYPOINT ["/bin/bash"]