catthehacker / docker_images

Docker images
MIT License
212 stars 75 forks source link

Build rust images for ARM64 & use `cargo binstall` for faster build time #120

Closed cfstras closed 8 months ago

cfstras commented 8 months ago

Hi,

I wanted to use act on an M1 MacBook, but noticed that the rust flavor doesn't have an image on Docker Hub for linux/arm64. This is unfortunate, since running amd64 rustc through QEMU often leads to segfaults and other crashes, and is pretty slow.

My guess is the reason for this situation is similar -- building the rust variant on the amd64 GH Actions runners takes way too long and times out.

Hence I switched the image building variant to install cargo-binstall instead of installing from source.

I hope this is well-received ;)

Here's an example build run I did: https://github.com/cfstras/docker_images/actions/runs/7221756769

ChristopherHX commented 8 months ago

Thank you for your PR @cfstras, this is useful for other users of act as well.

I'm merging this now, disabling the rust arm64 image was the quickes temporary solution for reenabling arm64 flavor builds before your change.