mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #269] "sudo: command not found" in micro image #187
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#187
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 @Pomax on GitHub (Jun 7, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/269
Why is the
ubuntu-latestcontainer claiming thatsudodoesn't exist? It kind of has to in order to run installers.This crashes, even though it never should:
@Senui commented on GitHub (Jun 9, 2020):
+1; installing the
sudopackage is also not required on the actual Github Actions. I currently work around this by doingapt update && apt install sudoprior to my regular workflow, just for act to run without this initial failure.@github-actions[bot] commented on GitHub (Aug 9, 2020):
Issue is stale and will be closed in 7 days unless there is new activity
@przemub commented on GitHub (Oct 15, 2020):
The issue is still prevalent and prohibits running many actions.
@andrewnitu commented on GitHub (Oct 21, 2020):
@Senui where do you insert this line?
@Senui commented on GitHub (Oct 21, 2020):
I just add it as the first step:
@andrewnitu commented on GitHub (Oct 21, 2020):
Ah gotcha, i guess installing it again (from the perspective of the actual GitHub actions running on the web) won't cause any harm. Thanks! :)
@cameron-martin commented on GitHub (Oct 22, 2020):
I'm having this problem too. Can it be reopened? @nektos
@fabrice102 commented on GitHub (Dec 31, 2020):
One solution is to use the alternative image.
See https://github.com/nektos/act#alternative-runner-images
For the sake of completeness, here is the text from the README:
@Pomax commented on GitHub (Dec 31, 2020):
given that the main problem is that
sudois no preinstalled, which takes up near as makes no difference literally no space at all, I'd much rather seesudoadded to the base package. Anything else, we can install ourselves, but either the image has "root perms for everything" so that no su permissions are needed, or it comes with the few kb worth of sudo preinstalled so that things just work. Heck, even on a full perms image,sudoshould exist and just do nothing special. It's not an optional command, too much relies on it merely existing =)@rokcarl commented on GitHub (Apr 13, 2021):
Using the
apt update && apt install sudoworkaround doesn't seem to work anymore:@catthehacker commented on GitHub (Apr 13, 2021):
@rokcarl what image are you using?
@rokcarl commented on GitHub (Apr 13, 2021):
I'm
runs-on: ubuntu-latest, but now I'm thinking that I'm also usingcontainer:, so I guess this problem is within my custom docker container.@catthehacker commented on GitHub (Apr 13, 2021):
ubuntu-latestis platform name, not image.Image is listed in the log
@drschwabe commented on GitHub (Jul 7, 2021):
Just reviving this a little since I also came across the issue today. And found that the updated workaround can be to just use conditional ie- if running act locally vs Github Actions cloud.
Note you may still need to install sudo package for Github Actions.
@Pomax commented on GitHub (Jul 8, 2021):
Quoting ACT's own explaination for why it exists:
So if the workaround is "use different yaml for act vs. github", that's not a good workaround.
@catthehacker commented on GitHub (Jul 8, 2021):
node:12.6-buster-slimdoesn't havesudo, bigger images do have it@Pomax commented on GitHub (Jul 9, 2021):
That's mostly not an issue: act can run the container when installing, itself, and run a script that installs the "missing from buster-slim" universals like
sudo, before the user ever gets to play with it. It just doesn't, right now.@catthehacker commented on GitHub (Jul 9, 2021):
We already provide images that include
sudoand few other tools that are deemed most necessary for actions.@Pomax commented on GitHub (Jul 9, 2021):
Then really this issue should be briefly reopened, and then closed with a comment that explains which (still small rather than 18GB) image should be used instead, because right now the issue is closed because of github automation, so anyone who finds it is still going to be none the wiser about a solution.
@catthehacker commented on GitHub (Jul 9, 2021):
We still have #107 open that is pinned so people should see it easily, marking it as duplicate since main discussion is in #107