From 2e083bca28edafe2893ef2ab2cfc0792884f2cec Mon Sep 17 00:00:00 2001 From: toast-gear <15716903+toast-gear@users.noreply.github.com> Date: Tue, 1 Jun 2021 01:21:14 +0100 Subject: [PATCH] fix: fixing mising pip PATH (#585) * fix: fixing mising pip PATH * chore: removing User Site Directory Co-authored-by: Callum James Tait --- runner/Dockerfile | 4 ++++ runner/Dockerfile.dindrunner | 4 ++++ runner/Dockerfile.ubuntu.1804 | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/runner/Dockerfile b/runner/Dockerfile index f7383f02..2797689a 100644 --- a/runner/Dockerfile +++ b/runner/Dockerfile @@ -62,6 +62,7 @@ RUN set -vx; \ && echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers ENV RUNNER_ASSETS_DIR=/runnertmp +ENV HOME=/home/runner # Runner download supports amd64 as x64. Externalstmp is needed for making mount points work inside DinD. # @@ -88,6 +89,9 @@ RUN echo AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache > .env \ COPY entrypoint.sh / COPY --chown=runner:docker patched $RUNNER_ASSETS_DIR/patched +# Add the Python "User Script Directory" to the PATH +ENV PATH="${PATH}:${HOME}/.local/bin" + USER runner ENTRYPOINT ["/usr/local/bin/dumb-init", "--"] CMD ["/entrypoint.sh"] diff --git a/runner/Dockerfile.dindrunner b/runner/Dockerfile.dindrunner index 25b53ffc..be8a3003 100644 --- a/runner/Dockerfile.dindrunner +++ b/runner/Dockerfile.dindrunner @@ -73,6 +73,7 @@ RUN export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \ docker --version ENV RUNNER_ASSETS_DIR=/runnertmp +ENV HOME=/home/runner # Runner download supports amd64 as x64 # @@ -110,6 +111,9 @@ VOLUME /var/lib/docker COPY --chown=runner:docker patched $RUNNER_ASSETS_DIR/patched +# Add the Python "User Script Directory" to the PATH +ENV PATH="${PATH}:${HOME}/.local/bin" + # No group definition, as that makes it harder to run docker. USER runner diff --git a/runner/Dockerfile.ubuntu.1804 b/runner/Dockerfile.ubuntu.1804 index fa62ce4e..8cc53e7c 100644 --- a/runner/Dockerfile.ubuntu.1804 +++ b/runner/Dockerfile.ubuntu.1804 @@ -62,6 +62,7 @@ RUN set -vx; \ && echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers ENV RUNNER_ASSETS_DIR=/runnertmp +ENV HOME=/home/runner # Runner download supports amd64 as x64. Externalstmp is needed for making mount points work inside DinD. # @@ -88,6 +89,9 @@ RUN echo AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache > .env \ COPY entrypoint.sh / COPY --chown=runner:docker patched $RUNNER_ASSETS_DIR/patched +# Add the Python "User Script Directory" to the PATH +ENV PATH="${PATH}:${HOME}/.local/bin" + USER runner ENTRYPOINT ["/usr/local/bin/dumb-init", "--"] CMD ["/entrypoint.sh"]