mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[GH-ISSUE #196] Slim variant of nektos/act-environments-ubuntu:18.04 #133
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#133
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 @aidansteele on GitHub (Apr 17, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/196
My feeling reading some of the issues in this repo is that a lot of folks get stuck on the fact that we default to not using the enormous image - which is a reasonable IMHO. I've been thinking about whether there's a compromise we can reach, where we get e.g. 90% of the benefit at 30% of the size.
There would be pros and cons to this approach. Pros would likely be fewer issues on this repo, an easier getting-started process for most people, etc. Cons would be that the environment would be so close to the Github-provided one, but crucially not identical - which would cause a lot of head-scratching. Disregarding this for now, I started to take a cursory look at how we might want to shrink the image size.
All these numbers are on the uncompressed (~18GB total) image size:
What are your thoughts on this selective purge? I'm thinking that we'd likely want to automate the creation of the image + purging as well. If you're happy with the idea in general, I'll start experimenting with some approaches.
@cplee commented on GitHub (Apr 17, 2020):
@aidansteele I'm totally onboard with this idea 🚀
@cplee commented on GitHub (Apr 17, 2020):
btw - here's the repo for the image i built: https://github.com/nektos/act-environments
@aidansteele commented on GitHub (Apr 17, 2020):
Great, good to hear you think it's a reasonable idea. I'll try report back with my findings / PR in the next few days - week.
@phaze9 commented on GitHub (Apr 17, 2020):
I took the opposite approach by starting with act's default node:12.6-buster-slim image and adding what I need, which is currently docker.
If you're interested in creating a slim image tailored to your use-case, feel free to fork https://github.com/phaze9/action-runner
Or grab the slim image including docker-ce from https://hub.docker.com/repository/docker/phaze9/action-runner
@aidansteele commented on GitHub (Apr 27, 2020):
I got a chance today to start looking into this. I created a tool to convert the upstream
ubuntu1804.jsoninto a Dockerfile (I'll release that later) and attempted to build it. A few things:The total size is now just under 50 GB 🤯
It looks like some new things have been added to the environment since @cplee's image was built.
There are some steps I skipped as they failed and I didn't have time to look into why yet. The skipped steps were:
scripts/installers/docker-moby.sh(test failed due to dockerd not running inside container)scripts/helpers/containercache.sh(same as above)scripts/installers/homebrew.sh(refused to be installed as root)scripts/installers/aws-sam-cli.sh(uses homebrew)scripts/installers/mysql.sh(test failed to mysqld not running inside container)scripts/installers/1804/android.shscripts/installers/vcpkg.shscripts/installers/1804/php.shThese were all the steps that resulted in a layer on disk greater than 50 MB.
@github-actions[bot] commented on GitHub (Jun 27, 2020):
Issue is stale and will be closed in 7 days unless there is new activity
@github-actions[bot] commented on GitHub (Aug 27, 2020):
Issue is stale and will be closed in 7 days unless there is new activity
@kiptoomm commented on GitHub (Oct 21, 2020):
@aidansteele @cplee what happened to this? I am not so familiar with using Docker images so would love it if you can point me to any docs on how to use this slim variant. I tried using
ubuntu-latest=nektos/act-environments-ubuntu:18.04but it looks too large as it's taking forever to load. All I'm trying to do is to useacton paths-filter, a GH Action that requires git@pimterry commented on GitHub (Oct 22, 2020):
I've found an interesting alternative approach. I'm using this as my base image: https://github.com/httptoolkit/act-build-base/blob/main/Dockerfile
In effect, I'm sticking with a plain node base image, and just mixing in individual installers for the specific parts of the standard image I need, directly pulling individual scripts from
act-environments.Maybe there's a route through here? The installer scripts aren't quite as easy to use standalone right now as they could be (e.g. they don't work without document.sh preloaded into the right path) but with a few small tweaks there I can imagine an Act readme that said you can either:
For people like me, that'd be pretty useful - doing this seems to work perfectly, it's very easy, and it saves me an enormous amount of disk space.
For GitHub themselves it makes sense to provide an actions base that includes the kitchen sink, but no individual devs need all of that locally for every build.