mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #107] command not found (in image node:12.6-buster-slim, as opposed to GH Actions) #71
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#71
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 @fwilhe on GitHub (Feb 26, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/107
Hi,
as documented here GitHub configures passwordless sudo, so I can have sudo in my shell scripts to perform individual commands as root.
Given this minimal workflow:
The result on Actions is
uid=0(root) gid=0(root) groups=0(root)Running this workflow in
actyields this result:Not sure what the most elegant solution would be without re-building the
node:12.6-buster-slimimage to install sudo and configure it passwordless. But I think the goal should be to be 1:1 compatible with actions, if possible.@cplee commented on GitHub (Feb 26, 2020):
See https://github.com/nektos/act#runners.
You can customize the image used for the runs-on. I've created an image that is a match to GitHub runners, but its like 15GB!
@fwilhe commented on GitHub (Feb 26, 2020):
Hi @cplee
thanks for the work you put into this.
I know that the image is configurable, and I've locally tested with an image where I installed sudo. So this is kind of a workaround, but the reason I opened this issue is that this limits compatibility with workflows that run on GitHub. My intention was to point out where the documented (and actual) behavior of Actions is unequal the default of
act, which makes it less useful compared to what it could be.As mentioned I'm not sure what solution I would propose, as maintaining separate images seems inappropriate.
@cplee commented on GitHub (Feb 27, 2020):
Tough problem. The runners that GitHub Actions offers are huge. I didn't feel right using an 18GB image as the default, requiring users of
actto download that large of an image to run it.I chose the
nodeimage because it was required to run node actions and still light enough. Not sure how to proceed...not sure what good enough looks like for the default docker image.Open to ideas 🙏
@aidansteele commented on GitHub (Mar 12, 2020):
I wonder if there's a way we could make an intermediary image that has 90% of the needed CLI tools for 10% of the footprint of the giant image. The only way we could reasonably do that (beyond intuition) is scanning a corpus of public GH Actions and seeing what works.
Then again, maybe it would give people a false sense of security as these issues would crop up less often - so it would be "stranger" and more likely to result in bug reports. 🤔
@aniongithub commented on GitHub (Mar 16, 2020):
Maybe act could use a .Dockerfile that the user can customize to make sure whatever tools they need is available in the used image. This could live in
~/.act/or the current project directory?@cplee commented on GitHub (Apr 17, 2020):
see #196 for discussion on creating a slim runner
@christopherhesse commented on GitHub (Jun 4, 2020):
I think at least the documentation should be updated, it currently states "The environment variables and filesystem are all configured to match what GitHub provides." but should say that that is only the case if you use this non-default image.
I think that docker for mac/windows is actually not very good with large images, but that an 18GB image in general isn't that crazy given the high speed internet and large disks available today.
@mobileka commented on GitHub (Jun 26, 2020):
I would at least add common tools that are used in CI builds. For example,
makeis currently missing. I think that adding it doesn't change the size of the image that much but saves time and makes it much more convenient for a big crowd of people.Or maybe I'm doing something wrong without realizing it and make is actually in the image :)
@fwilhe commented on GitHub (Jun 26, 2020):
I guess there is not enough agreement on what is "common". In the end you would include everything that github installs in the runner, which @cplee already did in that 20 gig image.
I have to say that building my own "runtime" image worked well for me.
The nice thing with that image is that you can also use it to run the whole action in via
and to not rely on any "setup" actions. That makes it much easier to reproduce the github build on your local machine using
act.Hope that helps.
@mobileka commented on GitHub (Jun 26, 2020):
Yes, I agree. But the initial argument against using the huge github image seems to be its size. Such tools as
makeare tiny and are incredibly popular in this context, so it's not clear to me what's the practical motivation of not including it into the default image.In my opinion, most of the people interested in this project are interested in it because they already use github actions in their projects, not the other way around. Asking them to change their existing CI configuration (especially on a company/organization level) just to be able to test it with a particular tool doesn't seem to be practical.
Just my opinion though.
@fwilhe commented on GitHub (Jun 26, 2020):
I'm not the author of act, so I can only guess that the motivation is to use an off-the-shelf image, and not to build one and then discuss with everyone what should be included or not.
No, I'm not asking anyone to do that, I just say what worked for me.
@github-actions[bot] commented on GitHub (Aug 26, 2020):
Issue is stale and will be closed in 7 days unless there is new activity
@sjiekak commented on GitHub (Sep 10, 2020):
seems like git is not inside the node:12.6-buster-slim image either. Which is counter intuitive.
@gvolpe commented on GitHub (Dec 3, 2020):
Got the same issue on NixOS, running this simple workflow.
@tyeth commented on GitHub (Dec 11, 2020):
I propose we offer the large or slim image upon initial install (I used choco) and also include a configuration command (
act --default-image slim/github/other) with the addition of--globalaffecting all images not the current workspace. Or something along those lines.I'm just here to avoid never using act again because like mentioned above the readme clearly states it just works out the box and matches github actions like for like but locally in docker. This is not the case, and as a lazy user (I'd imagine 90% of your userbase) I would be happy to be asked once during install or just have to set my preferred default once and forget it. But to be honest I'm confused. In my head if you take the same docker image as github does and the action specify then yes it would be large but that's what the user signed up for. Still I feel your pain and appreciate the idea of slim by default. Also I dislike installers that don't have command line options like
-yto answer yes to everything.Separately, nice to see a healthy community and thanks for all the hard work / input all. Can't wait to see this move forward, but I'd be keen to hear if anyone had similar utility by using the official local github build agent, I imagine that's probably accessible/hackable enough (able to get access to terminal and files).
@catthehacker commented on GitHub (Dec 11, 2020):
Don't use GitHub actions or run full GitHub Actions docker image then.
@tyeth commented on GitHub (Dec 15, 2020):
How's about we enhance the readme to mention how to run the full image in the installation instructions. That will remove most of these "duplicate" issues. Basically it needs to be more than obvious that 99% of users will need to do this or face errors...
Having the sections after detailed usage instructions is a case of TLDR, and I did RTFM (mostly initially then fully after experiencing issues) but still missed it and then got my syntax wrong for my already instantiated act instance once I'd finally spotted it. The configuration file eventually solved my snafu 🤦
@catthehacker commented on GitHub (Jan 10, 2021):
@tyeth Would something like this be okay?

@gvolpe commented on GitHub (Jan 11, 2021):
I think that's fair @CatTheHacker . If possible, I would like to see another Small image with essential Unix tools such as
sudo,curl,awk, etc.@tyeth commented on GitHub (Jan 11, 2021):
@CatTheHacker Brilliant yes, and maybe worth mentioning in that comment its using the Github official image for big (somehow more concisely). Thanks for taking a look at windows Path slash direction too.
@fwilhe commented on GitHub (Jan 11, 2021):
It might make sense to also base the "small" image on Ubuntu. I noticed that the setup-python action for example relies on ubuntu specifically to find out which archive to download, and fails on the node image that is based on debian.
@catthehacker commented on GitHub (Jan 11, 2021):
@gvolpe that's not in my power, to me it also seems weird that image without
sudoorcurlwas chosen as default. I can make such as default in my fork but it will be up toactowner if they will chose to implement that in the end.@tyeth There isn't any official GitHub image for Docker unless you mean
actbig one. I'm open for suggestions on how to write/convey the message 👍 since I'm usually not the best in describing things to people.@fwilhe Just, Yes. (even though I'm always for Debian and
hatestrongly dislike Ubuntu, but when usingubuntu-xx.xxrunner, I expect it to be actually Ubuntu)feel free to make any suggestions, I'm trying to do as much as possible for this repo in free time
@tyeth commented on GitHub (Jan 12, 2021):
My english brain is not firing on all cylinders right now, but having seen the merge progress today I thought I'd better get back here sharpish 👀 Maybe just add to the brackets describing big, from (includes more tools) to (included tools match Github Actions)
But I'd feel better with something else 🤦 Any suggestions people?
@catthehacker commented on GitHub (Jan 14, 2021):
Ok, so I've been thinking a bit and came up with this
node:12.6-buster-slim(we could build upon that image to add below image env vars but leave it with just node.js, to make it a bit more compatible)ubuntu:act-*, includes required env vars for some software setup (likeruby/setup-ruby), includes more tools (gawk,curl,git,ssh,etc.)nektos/act-environments-ubuntu:18.04bigand mine aslarge(quay.io/catthehacker/virtual-environments | https://github.com/CatTheHacker/virtual-environments)Looking for feedback/suggestions
@xloem commented on GitHub (Feb 13, 2021):
It would be really nice if there were clear instructions on how a user can build and enable an image of their own that matches the one used by github. Here's are two clear question to answer:
@catthehacker commented on GitHub (Feb 13, 2021):
@xloem
@xloem commented on GitHub (Feb 13, 2021):
Modifications to remove or install inaccessible commands. I'll ask the first question a different way:
I infer the way to run a custom docker image is:
Dockerfilein the folder based on a simple template (needs link to example).actrcto reference the name of the image like nektos/act-environments-ubuntu:18.04 in-P ubuntu-18.04=nektos/act-environments-ubuntu:18.04@catthehacker commented on GitHub (Feb 13, 2021):
It's just not possible due to the way how Docker works. See https://github.com/actions/virtual-environments/discussions/2320#discussioncomment-328445
I'd say it's not our responsibility to teach how to make Docker images, there is plenty of (much better) sources that go into details on how to do that where official Docker documentation is quite good source on that.
README.mddescribes:Eventually there could be link to Docker documentation regarding how to make Docker images in
README.md.@killthekitten commented on GitHub (Apr 12, 2021):
I was debugging another issue and wanted to check if the large image would solve it. It looks like I'm stuck with the micro image that I've chosen at the very first install. Is there a way to force-reset to the large one?
I've tried a bunch of things:
act~/.actrc~/.cache/act-P ...with the commandAfter reinstalling it fails almost instantly and never attempts to download the large image, and it looks like
containerssection of the workflow overrides theruns-on.Logs
@catthehacker commented on GitHub (Apr 12, 2021):
@killthekitten
You are using
python:3.8.5according to your log.To get default image survey,
.actrccannot exist in~,~/.config/and current directory whereactis run or you can just replace image yourself, those are described in README@killthekitten commented on GitHub (Apr 12, 2021):
@catthehacker thanks for the fast response!
Did you mean it can exist or cannot exist?
I tried replacing the python runtime with no big success:
Maybe it has to do with
runs-onandcontainerdefined at the same time? It comes from this section of my workflow:@catthehacker commented on GitHub (Apr 12, 2021):
containerwill use the image you defined incontainer:.-Pis used to replace image used inruns-on:.@jonico commented on GitHub (Apr 17, 2021):
@catthehacker : First of all I like to show my fullest appreciation for all the work you were doing to provide access to multiple image sizes. I was wondering whether in order to avoid many duplicate issues here - one could create symlinks to tools that have not been included in the smaller images to a file that once executed provides a message explaining that you need a larger image, point to this issue and then error out?
@catthehacker commented on GitHub (Apr 17, 2021):
@jonico that's an amazing idea, I'll try to work on that.
@jonico commented on GitHub (Apr 17, 2021):
If one were to use an unusual exit code for that script, one may also have special treatment of this error code one the docker container exited - will definitely try out any suggestions you do 😊
@catthehacker commented on GitHub (Apr 17, 2021):
I would use already existing exit code
127which stands for command not found but I will usecommand-not-foundor write small Go program to make proper error message and add it to image.@jonico commented on GitHub (May 17, 2021):
@catthehacker: I will feature nektos/act in GitHub's upcoming summer fest. I figured you are in a similar time zone and might be interested in listening in. Here is the registration link (everybody is welcome - and there will be :octocat: swag for the first 200 registrants): https://resources.github.com/webcasts/Summerfest-2021-South-Europe/
@catthehacker commented on GitHub (May 18, 2021):
@jonico I've tried to work on the not installed tools and:
bashcommand_not_found_handlewon't work because like in GHA, we don't load profiles andrcfiles@jonico commented on GitHub (May 18, 2021):
Would it be possible to intercept the 128 / command not found when the docker container already exited?
@catthehacker commented on GitHub (May 25, 2021):
Sounds possible but haven't got around that yet.
@catthehacker commented on GitHub (Aug 11, 2021):
@jonico

@jonico commented on GitHub (Aug 11, 2021):
@catthehacker: Wonderful 😻 - I would suggest to change the error message to
"Please see https://github.com/nektos/act/issues/107 for potential reasons and solutions." but this is probably just 🚲 shedding 😊
@RyanMeulenkamp commented on GitHub (Oct 26, 2022):
Why isn't the
ghcommand installed though?@Waltari10 commented on GitHub (Feb 24, 2023):
So I tried using the medium instead of slim for git, but noticed medium doesn't have yarn :/
@fwilhe2 commented on GitHub (Apr 10, 2023):
Not sure if this is useful for anyone, but out of curiosity I've tried to build a 'minimal' runner image based on github's packer scripts. The repo is here, the image is published to DockerHub both for x86 and arm.
The idea is to keep the pre-installed amount of tools low because I assume most workflows anyway use
setup-*actions.I know about existing images, but maybe mine fill a gap and are useful for some people?
Let me know if this is useful to you.
@alexeysergeev-cm commented on GitHub (Dec 31, 2023):
Were you able to resolve this? Should I install
ghfirst viabrew install?@RichardJECooke commented on GitHub (Feb 20, 2024):
Is this the command I'm supposed to use please? It doesn't seem to spend time pulling any bigger image though -
I still get this error
same as when I tried running
@rseymour commented on GitHub (Feb 21, 2024):
What's interesting is the runner links are broken above, and I would love to know how to use the 18GB runner right now.
@rseymour commented on GitHub (Feb 21, 2024):
For those looking, the docs on runners have apparently moved here: https://nektosact.com/usage/runners.html also my issue is one of surprise. The first run I was asked how large an env would I like. I chose micro, because I'm just starting. By making that uninformed choice, I spent the last couple hours trying to figure out what issue 107 meant and how to do
-P ubuntu-latest=catthehacker/ubuntu:act-latestonce I finally found the documentation. Forcing a user on first run to make a size choice with no obvious way to change said choice is a great way to trap folks in this non-intuitive error.@munapower commented on GitHub (Mar 13, 2024):
I added these steps and act was able to add
yarnwith that@lewsmith commented on GitHub (Apr 18, 2024):
Very old issue, but I'm getting around it by installing sudo if
env.ACTis true. That way only 4 extra lines are needed. E.g.@gliptak commented on GitHub (Apr 28, 2025):
do newer Node images also exhibit this behaviour?
@will-e-yams commented on GitHub (Aug 12, 2025):
This link is dead.
@gliptak commented on GitHub (Aug 13, 2025):
https://nektosact.com/usage/runners.html
@imide commented on GitHub (Aug 27, 2025):
Medium lacks mvn FYI...
@panekj commented on GitHub (Aug 27, 2025):
Medium images lack everything that isn't base requirement for using Actions, so it contains
git, couple other most common CLI tools and NodeJS/Docker (since that's required to run docker/node actions) + few bits to make environment more compatible/acting like GHA runners.If you know you are using specific language tooling or something that's more sophisticated, then use full images. Medium images are only meant to be a better default than nodejs image.
@JustCryen commented on GitHub (Oct 6, 2025):
Hi, I started using Github Local Actions extension for VScode. This is also my first contact with act.
I am using the "Medium" image and I'm trying to run it on a zmk repository (zmk is a tool / firmware for programmable keyboards and it is using Github Actions)
The failure seems to be related to a 'node' command and since NodeJS is supposed to work on a Medium image I'm not sure where the problem actually is.
I could try the Large image but currently I'm not sure if it will fix my problem, its size is actually quite a lot.
If there is another option I would rather try it first before moving to the Large image.
I'm not sure if any other language is being used here.
The build config file in my repository points to this build file in a remote / main project repo:
https://github.com/zmkfirmware/zmk/blob/main/.github/workflows/build-user-config.yml
I'll include shortened result of not just one Failure, but every place a Failure occurred. If you prefer a full log just ask.
Any help is highly appreciated!
@daniellaera commented on GitHub (Nov 11, 2025):
Hello everyone, I just landed on this topic and I wanted to give my config if it can help.
I had an LXC container on proxmox + a Ubuntu VM for the Act Runner docker image.
My actual config is.
docker compose for the runner
then in a test-repository on the Gitea server a simple test.yml in the .gitea/workflows/ folder:
another yml in the same folder for build, tag and push image to package registry:
@VitalickS commented on GitHub (Dec 31, 2025):
You can use vaibhavgawali/dotnet-node-python-openjdk (1.2Gb) with all frameworks bundle. Memory usage !== Image size, so 1.2gb not a big deal.