Skip to content

Conversation

larskanis
Copy link
Member

Based on #140 . No idea if it works - I don't have a Mac.

…NG.md

And add a buildkit config which disables the garbage collection of the cache.
Our images are too many and too fat, so that it gets deleted half way otherwise.
This way we can provide images for Intel/AMD based as well as ARM based systems.

Image building is now prefixed by the host architecture "arm" or "x86" and the local host arch is loaded after build:

```
rake build:arm:arm-linux-musl      # Build and load image for platform arm-linux-musl on linux/arm64
rake build:arm:arm64-darwin        # Build and load image for platform arm64-darwin on linux/arm64
rake build:arm:jruby               # Build and load image for JRuby on linux/arm64
```

The foreign architecture is only built:

```
rake build:x86:arm-linux-musl      # Build image for platform arm-linux-musl on linux/amd64
rake build:x86:arm64-darwin        # Build image for platform arm64-darwin on linux/amd64
rake build:x86:jruby               # Build image for JRuby on linux/amd64
```

Only `docker buildx build` supports multiple platforms, so that it is used now, instead of the classic `docker build`.

The number of images doubles with this patch, so that I get errors building all in parallel.
Therefore the number of parallel tasks should be limited like:

```
rake -j10 build:all
```
@larskanis
Copy link
Member Author

I started a naive attempt to run docker in github actions on macos-14 running ARM64, but it fails when starting the VM:

error starting vm: error at 'creating and starting': exit status 1

On the other hand I found an Github action which is to setup docker on macos, but it isn't supported on ARM64, since neither the hardware nor the software supports it currently: https://github.com/marketplace/actions/setup-docker-on-macos

So this way is not usable for now and the near future to build ARM64 images for rake-compiler-dock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant