File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,14 @@ RUN true \
99&& true
1010
1111# Explicitly set UID/GID to 1001 to match GitHub Runner
12- RUN groupadd -g 1001 build && \
13- useradd -m -u 1001 -g 1001 -s /bin/bash build && \
14- echo "build ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
12+ # this means the github-actions user in the host must have this uid/gid as well
13+ RUN groupadd -g 1001 github-actions && \
14+ useradd -m -u 1001 -g 1001 -s /bin/bash github-actions && \
15+ echo "github-actions ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
1516
16- WORKDIR /home/build /project
17+ WORKDIR /home/github-actions /project
1718
18- RUN chown build:build /home/build
19+ RUN chown github-actions:github-actions /home/github-actions
1920
2021# 4. Switch to the non-root user
21- USER build
22+ USER github-actions
You can’t perform that action at this time.
0 commit comments