catthehacker / docker_images

Docker images
MIT License
212 stars 75 forks source link

js images for arm64? #92

Closed doubleforte closed 1 year ago

doubleforte commented 1 year ago

The act-20.04 and runner-20.04 support multiple architectures, but the more targeted images are only for amd64.

I'm specifically trying to use js-20.04 on an M1 Mac, so it wants arm64.

My workaround is to use act-20.04 as a base and then install my javascript tools as part of my own Dockerfile, but it would be nicer to have the perks of a js-specific image with all that stuff preinstalled, as it is for amd64 machines.

ChristopherHX commented 1 year ago

I have problems running npm install on a github actions intel hosted agent via qemu arm64.

npm takes much much longer and eventually times out. Can I copy the node_modules of the x86_64 npm install? It takes a factor of 100 longer to download thing under arm64 emulation.

Maybe npm install --arch=arm64 in a multi stage Dockerfile running on x86_64? Then copy the node_modules to the destination.

catthehacker commented 1 year ago

As long as something doesn't require gyp it should work fine by just copying

ChristopherHX commented 1 year ago

I think this repos should switch to buildah and script the build process of the image. This makes it easier to branch for amd64 and arm64 cases and has a proper documented process to build, merge and push multi arch images.

However I postpone doing anything like that

catthehacker commented 1 year ago

It's better to create repo for building images from scratch.

ChristopherHX commented 1 year ago

It's better to create repo for building images from scratch.

Without your secrets (Obviously I could dump them somehow) I cannot do this without modifing act's default images and telling everyone to update their act settings.

_My buildx hack stopped working by a docker update, I patch it here inplace with buildah and less hacks (https://github.com/catthehacker/docker_images/pull/103)_

catthehacker commented 1 year ago

Without your secrets (Obviously I could dump them somehow) I cannot do this without modifing act's default images and telling everyone to update their act settings.

I was hoping we could have images under ghcr.io/nektos namespace or something alike

ChristopherHX commented 1 year ago

Yes in long term that is better, but cplee need to create the repo first.