@@ -52,16 +52,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
5252
5353
5454# Setup user and permissions
55- # RUN useradd -c "Action Runner" -m runner && \
56- # usermod -L runner && \
57- # echo "runner ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/runner && \
58- # groupadd docker || true && \
59- # usermod -aG docker runner && \
60- # (test -S /var/run/docker.sock && chmod 660 /var/run/docker.sock && chgrp docker /var/run/docker.sock || true)
55+ RUN useradd -c "Action Runner" -m runner && \
56+ usermod -L runner && \
57+ echo "runner ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/runner && \
58+ groupadd docker || true && \
59+ usermod -aG docker runner && \
60+ (test -S /var/run/docker.sock && chmod 660 /var/run/docker.sock && chgrp docker /var/run/docker.sock || true)
6161
62- # Create a non-root user temporarily for the runner setup
63- RUN useradd -m runner && \
64- echo "runner ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/runner
6562
6663# Add and configure GitHub Actions runner
6764ARG RUNNERREPO="https://github.com/actions/runner"
@@ -83,12 +80,9 @@ RUN cd /tmp/runner/src && \
8380
8481RUN mkdir -p /opt/runner && \
8582 tar -xf /tmp/runner/_package/*.tar.gz -C /opt/runner && \
86- # chown -R runner:runner /opt/runner && \
83+ chown -R runner:runner /opt/runner && \
8784 su - runner -c "/opt/runner/config.sh --version"
8885
89- # Remove temporary user after setup
90- RUN deluser runner && rm -rf /etc/sudoers.d/runner
91-
9286RUN rm -rf /tmp/runner /tmp/runner.patch
9387
9488# Copy custom scripts and set permissions
@@ -99,7 +93,7 @@ COPY manywheel-ppc64le.tar /home/actions-runner/manywheel-ppc64le.tar
9993
10094
10195# Switch to the runner user
102- # USER runner
96+ USER runner
10397
10498# Set working directory
10599WORKDIR /opt/runner
0 commit comments