mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[GH-ISSUE #556] Issue: Unable to execute docker build within a Github Action workflow #376
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#376
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 @jaypipes on GitHub (Mar 7, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/556
Act version
Note this is on Fedora 33 with Docker version 19.03.13.
Expected behaviour
I want to be able to execute
docker buildfrom a github action workflow without getting permissions failure.Actual behaviour
Workflow and/or repository
workflow
Steps to reproduce
actoutputLog
@catthehacker commented on GitHub (Mar 7, 2021):
Could you provide output of
ls -l /var/run/docker.sock?@jaypipes commented on GitHub (Mar 8, 2021):
Hi @catthehacker, thanks for looking into this!
@jaypipes commented on GitHub (Mar 8, 2021):
@catthehacker also, FWIW, running
dockeron Fedora, I almost always have to pass the:zflag at the end of any volume mounts, otherwise I get permissions errors from selinux content labels not being properly applied from host to container filesystem. See https://www.projectatomic.io/blog/2015/06/using-volumes-with-docker-can-cause-problems-with-selinux/ for more details. Adding:zor:Zto my mount specs always fixes the problem.I looked in the
actcodebase briefly and think that adding the:zflag here:github.com/nektos/act@8de7b956b7/pkg/runner/step_context.go (L214)and here:
github.com/nektos/act@8de7b956b7/pkg/runner/run_context.go (L86)might do the trick...
@catthehacker commented on GitHub (Mar 8, 2021):
Seems like using
:Zis not an option or we could break a lot of stuff and:z/:Z/:rorequire to be volumes and not bind mounts otherwise those are ignored (https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label). I'll try to set up Fedora environment for myself and test it out how to deal with it.Although from documentation and this comment it seems that the proper way is to modify host paths instead of using
:z.@jaypipes commented on GitHub (Mar 9, 2021):
Any particular reason the code uses bind mounts instead of (or, rather, in addition to) volumes?
Sorry, I read that issue and particular comment a number of times and I'm still scratching my head as to what the solution actually would entail here. Mind elaborating?
Thanks again for your help @catthehacker!
@jaypipes commented on GitHub (Mar 23, 2021):
@catthehacker any updates on this?
@catthehacker commented on GitHub (Mar 24, 2021):
@jaypipes Sorry, I never used Linux distro with
selinuxso can't help with that. As for the mounts/binds I have yet to try and figure it out since I didn't had much time lately.@jaypipes commented on GitHub (Mar 30, 2021):
@catthehacker OK, so I ended up just turning off SELinux entirely and that has solved this issue. Honestly, for development desktops, I have a feeling that SELinux is just more bother than anything useful. :) Closing issue out...
@LouKordos commented on GitHub (Jun 5, 2021):
I'm on Arch Linux and the issue is still present for me... Is there any quick fix for this? I'm on the latest
mastercommit.@catthehacker commented on GitHub (Jun 5, 2021):
Turn off SELinux
@LouKordos commented on GitHub (Jun 6, 2021):
I'm running Arch Linux, and
sestatussayscommand not found, so I'm 99% sure it's not installed, which makes sense since it's not Redhat.@catthehacker commented on GitHub (Jun 6, 2021):
Please create new issue then
@LouKordos commented on GitHub (Jun 6, 2021):
Done