[PATCH 5/6] containers/container_builder: Container for python scripts
ohilyard at iol.unh.edu
ohilyard at iol.unh.edu
Tue Oct 11 18:52:54 CEST 2022
From: Owen Hilyard <ohilyard at iol.unh.edu>
Adds a container that can be used to run the python scripts to create
the Dockerfiles for the CI containers. This removes a large number of
python environment dependencies from the host requirements.
Signed-off-by: Owen Hilyard <ohilyard at iol.unh.edu>
---
containers/container_builder.dockerfile | 26 +++++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 containers/container_builder.dockerfile
diff --git a/containers/container_builder.dockerfile b/containers/container_builder.dockerfile
new file mode 100644
index 0000000..8a38e53
--- /dev/null
+++ b/containers/container_builder.dockerfile
@@ -0,0 +1,26 @@
+FROM ubuntu:22.04
+
+ENV DPDK_CI_CONTAINERS_COMPOSE_FILE_BUILDER=podman-compose
+ENV DPDK_CI_CONTAINER_BUILDER_PROGRAM=podman
+ENV DPDK_CI_CONTAINERS_PYTHON3_CMD=python3
+ENV DEBIAN_FRONTEND=noninteractive
+
+# If building on a RHEL host, 'yum repolist' will refresh the RHEL repos from the host this is being built on
+RUN apt-get update && apt-get install --no-install-recommends -y \
+ python3 python3-pip \
+ # Makefile deps
+ make git
+RUN pip3 install poetry
+
+RUN git config --global --add safe.directory /container_workspace/container_context/dpdk
+RUN git config --global --add safe.directory /container_workspace/container_context/libabigail
+
+# Globally install required python libraries
+COPY template_engine/pyproject.toml /tmp/pyproject.toml
+COPY template_engine/poetry.lock /tmp/poetry.lock
+WORKDIR /tmp/
+RUN poetry config virtualenvs.create false
+RUN poetry install --no-interaction --no-ansi
+
+RUN mkdir /container_workspace
+WORKDIR /container_workspace
--
2.34.1
More information about the ci
mailing list