Skip to content

Commit 491c691

Browse files
committedMar 26, 2022
feat: work with rootless docker
Running docker currently mounts the docker.sock file into the container. This was introduced in 2ab738c but there is no explanation provided. The docker.sock file is only needed if we want to run docker inside the container to create other images or start other containers. I searched through the code and I did not find any such use. In particular, on fedora this gives permission denied because docker.sock is owned by root and the container runs under an unprivileged user. One has to change the permissions of docker.sock (which is actually a link to /run/podman/podman.sock) to be writeable by the user. If we don't need to use docker inside the containers, then we can remove this file, thus we can run this GitHub action as an unprivileged user out of the box.
1 parent 1ae498b commit 491c691

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed
 

‎dist/index.js

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/model/docker.ts

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ class Docker {
5252
return `--env UNITY_SERIAL \
5353
--env GITHUB_WORKSPACE=/github/workspace \
5454
${sshAgent ? '--env SSH_AUTH_SOCK=/ssh-agent' : ''} \
55-
--volume "/var/run/docker.sock":"/var/run/docker.sock" \
5655
--volume "${githubHome}":"/root:z" \
5756
--volume "${githubWorkflow}":"/github/workflow:z" \
5857
--volume "${workspace}":"/github/workspace:z" \

0 commit comments

Comments
 (0)