We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20b3397 commit 958a611Copy full SHA for 958a611
1 file changed
.github/docker/python-nodejs.Dockerfile
@@ -9,13 +9,14 @@ RUN true \
9
&& true
10
11
# 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
+# this means the github-actions user in the host must have this uid/gid as well
+RUN groupadd -g 1001 github-actions && \
+ useradd -m -u 1001 -g 1001 -s /bin/bash github-actions && \
15
+ echo "github-actions ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
16
-WORKDIR /home/build/project
17
+WORKDIR /home/github-actions/project
18
-RUN chown build:build /home/build
19
+RUN chown github-actions:github-actions /home/github-actions
20
21
# 4. Switch to the non-root user
-USER build
22
+USER github-actions
0 commit comments