docker_images icon indicating copy to clipboard operation
docker_images copied to clipboard

Runner should include "gh" tool

Open docwhat opened this issue 2 years ago • 12 comments

The runner in GitHub Actions has gh by default and some actions depend on that being there.

docwhat avatar Sep 21 '21 19:09 docwhat

I'm not aware of any such actions

catthehacker avatar Sep 21 '21 19:09 catthehacker

My action uses gh to trigger another build.

I can't find the action I got the idea from in the marketplace. If I find it, I'll add it here.

docwhat avatar Sep 22 '21 19:09 docwhat

That just seems like a laziness to not use jq + curl There is ~10k actions available on GitHub, I can't satisfy everyone's needs. If you need gh, full-latest/full-20.04/full-18.04 has that. image

Until I finish working on an image that will be balanced between act-* and full-*, it will not be added. You can also checkout https://github.com/jhchabran/docker_images/pkgs/container/ubuntu https://github.com/jhchabran/docker_images/pull/1

catthehacker avatar Sep 22 '21 19:09 catthehacker

Fair enough.

Is there any way to see what the official runners are installing? I mean, I guess I could write an action to tar everything up and send it to me...

docwhat avatar Sep 22 '21 19:09 docwhat

Is there any way to see what the official runners are installing? I mean, I guess I could write an action to tar everything up and send it to me...

I don't think you would want 60GB tar file... https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md

catthehacker avatar Sep 22 '21 19:09 catthehacker

Wow! Okay, yeah... no. Never mind that thought.

docwhat avatar Sep 22 '21 20:09 docwhat

I'll leave issue open since I'm going to make better image (bigger than act-*, smaller than full-*) but will it be tomorrow, will it be in few months, who knows. I'm currently on training till end of the week, so not much time to work on that but I'll try to polish what I've written already (oh my lord, it was 2 months ago). image

catthehacker avatar Sep 22 '21 20:09 catthehacker

custom images available which include gh + more ghcr.io/catthehacker/ubuntu:custom-latest ghcr.io/catthehacker/ubuntu:custom-20.04

catthehacker avatar Apr 01 '22 10:04 catthehacker

Is there any way to see what the official runners are installing? I mean, I guess I could write an action to tar everything up and send it to me...

I don't think you would want 60GB tar file... https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md

Is there download links for Microsoft/GitHub's official tar files? (I know it's possible to use Packer on Azure myself, just kinda annoying.)

Manouchehri avatar Apr 05 '22 19:04 Manouchehri

Is there download links for Microsoft/GitHub's official tar files?

tar files of images?

catthehacker avatar Apr 05 '22 19:04 catthehacker

Is there download links for Microsoft/GitHub's official tar files?

tar files of images?

Er sorry, meant to say VHD (or similar).

Manouchehri avatar Apr 05 '22 19:04 Manouchehri

No, runner images are not published anywhere

catthehacker avatar Apr 05 '22 19:04 catthehacker

custom images available which include gh + more ghcr.io/catthehacker/ubuntu:custom-latest ghcr.io/catthehacker/ubuntu:custom-20.04

Are these images still available somewhere? I'm getting a "manifest unknown" error

tlevesque-ueat avatar Feb 01 '23 20:02 tlevesque-ueat

I also didn't find those particular tags, but found others like ubuntu:custom-22.04-20230201 or ubuntu:custom-latest-20230201. However, the gh command is still unavailable on these images. As far as I understand, this is because this PR has not been merged yet. @catthehacker, am I correct? Are there any medium-sized images that have gh onboard at the moment?

udovichenko avatar Feb 04 '23 11:02 udovichenko

catthehacker/ubuntu:custom-latest now contains gh.

Also a smaller just base image + gh tool is now available catthehacker/ubuntu:gh-latest

ChristopherHX avatar Sep 18 '23 22:09 ChristopherHX

Just for your information

catthehacker/ubuntu:custom-latest now contains gh.

is > 1.5 GB

Also a smaller just base image + gh tool is now available catthehacker/ubuntu:gh-latest

but doesn't have basics like curl...

Would be nice to configure something like https://docs.pkgx.sh/run-anywhere/docker in those images that makes it easy and straight forward to install those tools on demand...

karfau avatar Nov 21 '23 22:11 karfau

We could probably put homebrew inside, since they implemented API based package index as opposed to having whole repository cloned

catthehacker avatar Nov 21 '23 22:11 catthehacker

I updated my comment to point to pkgx, this makes it really simple. (see link above) Since curl is already part of ghcr.io/catthehacker/ubuntu:act-22.04 ti should be straight forward to add that to the mix?

Update: but pkgx is not part of the ubuntu github runners so far, so before being able to use it in workflows we would anyways need to install it (using curl) so I don't think it really is something people would expect to be present...

karfau avatar Nov 21 '23 22:11 karfau

Missing curl is probably a defect in the current image version. Due to renaming a folder in upstream repo. It should reappear pretty soon.

but doesn't have basics like curl...

docker run catthehacker/ubuntu:gh-latest curl --version
Unable to find image 'catthehacker/ubuntu:gh-latest' locally
gh-latest: Pulling from catthehacker/ubuntu
316b101e2624: Pull complete 
bda9475457ac: Pull complete 
bdcf0832f61e: Pull complete 
fedf8591fe4c: Pull complete 
6b87279b87d2: Pull complete 
4ca545ee6d5d: Pull complete 
b4c629793e66: Pull complete 
Digest: sha256:5abfbef0453bbc77c84e2a59a4c878fb4676a50e25d273c630b00b494cc4471a
Status: Downloaded newer image for catthehacker/ubuntu:gh-latest
curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.16
Release-Date: 2022-01-05
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets zstd

Cannot see that curl is missing

ChristopherHX avatar Nov 21 '23 22:11 ChristopherHX