diff options
author | Martin Roth <gaumless@gmail.com> | 2023-11-10 13:20:18 -0700 |
---|---|---|
committer | Felix Singer <service+coreboot-gerrit@felixsinger.de> | 2023-11-12 04:53:44 +0000 |
commit | 162b6484ff0a77ee4597b407281f76232cd02d47 (patch) | |
tree | 5a6c469b349b3f6029e5e2111d1364e518deaf59 /util/docker | |
parent | dbc33f9376be8a2fc72e46ed14810527c3eb5b11 (diff) |
util/docker/jenkins-node: Install pip modules into virtual env
Instead of installing the pip modules system-wide, and possibly causing
conflicts, install them into a virtual environment for the coreboot
user.
If we wanted to, in the future, we could install different versions of
the modules into different virtual environment directories to allow
for testing or anything else we needed.
Change-Id: I49c749a13a698bfb7af29bf07e42ac14b67b2ae7
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79006
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Diffstat (limited to 'util/docker')
-rw-r--r-- | util/docker/coreboot-jenkins-node/Dockerfile | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/util/docker/coreboot-jenkins-node/Dockerfile b/util/docker/coreboot-jenkins-node/Dockerfile index ae29e435ed..2cd8d7881c 100644 --- a/util/docker/coreboot-jenkins-node/Dockerfile +++ b/util/docker/coreboot-jenkins-node/Dockerfile @@ -31,6 +31,7 @@ RUN apt-get -y update && \ sdcc \ python3-pip \ pykwalify \ + python3-venv \ python3-yaml \ python3-pyelftools \ python3-jsonschema \ @@ -70,10 +71,13 @@ ENTRYPOINT mount /cb-build && \ EXPOSE 49151 USER coreboot -ENV PATH=$PATH:/home/coreboot/.local/bin -RUN echo "export PATH=$PATH:/opt/xgcc/bin" >> /home/coreboot/.bashrc && \ - pip3 install --upgrade --no-cache-dir pip \ - && pip3 install --no-cache-dir \ +ENV VIRTUAL_ENV="/home/coreboot/python3" +ENV PATH=$VIRTUAL_ENV/bin:$PATH:/home/coreboot/.local/bin +RUN echo 'export PATH=$PATH:/opt/xgcc/bin' >> /home/coreboot/.bashrc && \ + echo "source ${VIRTUAL_ENV}/bin/activate" >> /home/coreboot/.bashrc && \ + python3 -m venv /home/coreboot/python3 && \ + pip3 install --upgrade --no-cache-dir pip && \ + pip3 install --no-cache-dir \ setuptools==58.2.0 \ jinja2==3.1.2 \ recommonmark===0.7.1 \ |