mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #724] Issue: permission denied for docker socket #457
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#457
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LouKordos on GitHub (Jun 6, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/724
Originally assigned to: @catthehacker on GitHub.
System information
act: catthehacker/ubuntu:full-20.04actversion:go install github.com/nektos/act@master(commitfa93f4d5e7)Expected behaviour
Be able to run
docker buildand other docker commands inside a Github Actions workflow.Actual behaviour
The
docker buildstep fails with error/var/run/docker.sock: connect: permission denied.Workflow and/or repository
Clone
Loukordos/walking_controller, runact -v -P ubuntu-20.04=catthehacker/ubuntu:full-20.04.actoutputLog
@catthehacker commented on GitHub (Jun 6, 2021):
You need to
chmodorchownthe docker socket so user in the image has permissions to access it@LouKordos commented on GitHub (Jun 6, 2021):
Ok, I wasn't sure if this is "fine" from a security perspective, that's why I didn't want to do it right away. My perms are
What should I change the perms to?
@catthehacker commented on GitHub (Jun 6, 2021):
sudo chown runner:docker /var/run/docker.sockin workflow should fix the issue@LouKordos commented on GitHub (Jun 6, 2021):
Oh I should be running this in my workflow file?
@catthehacker commented on GitHub (Jun 6, 2021):
It can be run on host but you need to replace
runnerwith UID ofrunneruser, if I remember correctly it should be1000@LouKordos commented on GitHub (Jun 6, 2021):
Wow, looks like that actually fixed it! At least the
docker buildstep works now, I'm having some smaller permission issues right now, will see if I can fix those by myself.@LouKordos commented on GitHub (Jun 6, 2021):
Shouldn't
Exec command '[mkdir -p /home/loukas/dev/walking_controller/_actions/actions-checkout@master/]' | mkdir: cannot create directory '/home/loukas/dev/walking_controller/_actions': Permission deniedbe fixed by runningsudo chmod -R 777 ~/dev/walking_controller? I'm still getting the error...@catthehacker commented on GitHub (Jun 6, 2021):
That should be already fixed in
github.com/nektos/act@d794e2fe4c@LouKordos commented on GitHub (Jun 6, 2021):
Any way of getting that version? I mean I ran
go install github.com/nektos/act@master, which from what I can tell installed the binary in /home/loukas/go/bin/ and I used that, which brought up:Looks like some token issue. Or did I install the incorrect version with that command?
@catthehacker commented on GitHub (Jun 6, 2021):
Are you sure you don't have any other
actsomewhere inPATH? Above issue is fixed in master already (github.com/nektos/act@ef0da2ab9e)@LouKordos commented on GitHub (Jun 6, 2021):
which actgives me "not found", and I'm using the absolute path/home/loukas/go/bin/act, and also just rerango install github.com/nektos/act@master@LouKordos commented on GitHub (Jun 7, 2021):
I just confirmed the same happens in a clean ubuntu 20.04 install with
go install github.com/nektos/act@master.@github-actions[bot] commented on GitHub (Jul 8, 2021):
Issue is stale and will be closed in 14 days unless there is new activity
@longility commented on GitHub (Aug 4, 2021):
@catthehacker I'm new to
act. I was hoping that it just works, but I did run into this issue as my workflow usesdocker. I was able to fix it like so as you suggest:I'm wondering if we can have this be transparent to where a developer like me don't need to know this. I'm not sure if it makes sense or not, but I would hope that I would not have to add extra steps to get my workflow to work.
@catthehacker commented on GitHub (Aug 4, 2021):
Running as non-root user is currently not supported
@catthehacker commented on GitHub (Dec 5, 2021):
Duplicate of #398
@christopher-davis-afs commented on GitHub (Dec 18, 2023):
I'm a little confused - as someone who is trying to run a GitHub action that uses docker and runs into this issue, what steps do I take in order to allow
actto run my actions?@fabiobsantosprogrow commented on GitHub (Feb 2, 2024):
Using the feature request workaround until be available on the new version...