Replies: 6 comments 2 replies
-
I am facing a similar issue, but the config.sh and run.sh script complains: "Must not run as sudo." This leads to a myriad of problems executing things from the action file as there are tons of permissions issues. |
Beta Was this translation helpful? Give feedback.
-
This is the core mistake here. If you want a user to be able to use Docker without further authentication, add that user to the |
Beta Was this translation helpful? Give feedback.
-
I know it's an old thread, but it doesn't really have a direct answer, so I'll throw in mine. There's an article on docker docs how to run in rootles mode. You probably don't want to run the runner as root, but you can give it access to docker. Have a look at the link below. |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Is there anyone from GitHub official supporter could answer this question? This question still bothers me for a long time. Thank you very much! |
Beta Was this translation helpful? Give feedback.
-
Not an ideal solution but a workaround if you're testing. Run below to allow the runner to run as root. export RUNNER_ALLOW_RUNASROOT="1" |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
I've installed a self-hosted runner on a Linux VM that I have full access over. The runner itself works fine but whenever I try using docker on a workflow with that runner, the workflow fails with:
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/version": dial unix /var/run/docker.sock: connect: permission denied
Error: The process '/usr/bin/docker' failed with exit code 1
I'm aware of why this happens - it's because docker needs to be run as root.
However, I can't figure out how to make the actions runner program run as root. If I try to run the ./config.sh and ./run.sh programs as root, the runner fails to start with a "Must not run as sudo" error.
I've seen discussion online that this problem is solved by adding a RUNNER_ALLOW_RUNASROOT=1 parameter when running the config script (ie. RUNNER_ALLOW_RUNASROOT=1 ./config.sh -url ... --token ...) but this does not solve the problem; nothing changes by doing this.
Beta Was this translation helpful? Give feedback.
All reactions