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"]