Skip to content

Commit

Permalink
add runner user
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-morse-plastic committed Mar 27, 2024
1 parent fe47435 commit 9d6d836
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion username-1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ apt-get install -y tar python3 nano sudo jq git make \
apt-get clean

ARG username=github
RUN useradd -ms /bin/bash ${username}
RUN useradd -u 1000 -ms /bin/bash ${username}
RUN echo "%${username} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER ${username}
ENV HOME=/home/${username}

RUN sudo groupadd -g 127 docker
# RUN sudo useradd -u 1001 -g 127 -c ' ' -m -d /home/runner -s /bin/bash runner
RUN sudo useradd -u 1001 -g 127 -ms /bin/bash runner
RUN echo "%runner ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

# trust git folders with different owners
# RUN echo "W3NhZmVdCglkaXJlY3RvcnkgPSAqCg==" | base64 -d > $HOME/.gitconfig
Expand Down

0 comments on commit 9d6d836

Please sign in to comment.