From dc239f5ef47bf406c3b14042e222950d46ac89ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Reegn?= Date: Tue, 21 May 2024 22:27:43 +0200 Subject: [PATCH] Consistent use of UID of dind-rootless runner There are some consistency issues in the dind-rootless runner image that leads to some confusion on what exactly the UID of the runner is. To stay consistent use the same UID everywhere. --- ...ctions-runner-dind-rootless.ubuntu-22.04.dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/runner/actions-runner-dind-rootless.ubuntu-22.04.dockerfile b/runner/actions-runner-dind-rootless.ubuntu-22.04.dockerfile index b5f02d90..dd1b8e66 100644 --- a/runner/actions-runner-dind-rootless.ubuntu-22.04.dockerfile +++ b/runner/actions-runner-dind-rootless.ubuntu-22.04.dockerfile @@ -78,9 +78,9 @@ RUN cd "$RUNNER_ASSETS_DIR" \ && rm -f runner-container-hooks.zip # Make the rootless runner directory executable -RUN mkdir /run/user/1000 \ - && chown runner:runner /run/user/1000 \ - && chmod a+x /run/user/1000 +RUN mkdir /run/user/$RUNNER_USER_UID \ + && chown runner:runner /run/user/$RUNNER_USER_UID \ + && chmod a+x /run/user/$RUNNER_USER_UID # We place the scripts in `/usr/bin` so that users who extend this image can # override them with scripts of the same name placed in `/usr/local/bin`. @@ -97,8 +97,8 @@ COPY hooks /etc/arc/hooks/ # Add the Python "User Script Directory" to the PATH ENV PATH="${PATH}:${HOME}/.local/bin:/home/runner/bin" ENV ImageOS=ubuntu22 -ENV DOCKER_HOST=unix:///run/user/1000/docker.sock -ENV XDG_RUNTIME_DIR=/run/user/1000 +ENV DOCKER_HOST=unix:///run/user/$RUNNER_USER_UID/docker.sock +ENV XDG_RUNTIME_DIR=/run/user/$RUNNER_USER_UID RUN echo "PATH=${PATH}" > /etc/environment \ && echo "ImageOS=${ImageOS}" >> /etc/environment \