Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide multi-arch container images #53

Closed
holdenk opened this issue Dec 20, 2020 · 7 comments
Closed

Provide multi-arch container images #53

holdenk opened this issue Dec 20, 2020 · 7 comments

Comments

@holdenk
Copy link

holdenk commented Dec 20, 2020

I'd like to try and use buildbarn, but I've got an ARM cluster. Could using docker buildx make build barn work on ARM?

EdSchouten added a commit to buildbarn/bb-storage that referenced this issue Dec 21, 2020
In order to make the build pass, we have to make some slight changes to
the recently added atomic package. We need to give 32-bit ARM the same
treatment as 386, as 64-bit integers are also not 8-byte aligned. If we
ever need to figure this out for other platforms, we can grep Go's
src/runtime/internal/sys/arch_*.go for Int64Align.

Related to:
- buildbarn/bb-deployments#53
- golang/go#9959
@EdSchouten
Copy link
Member

EdSchouten commented Dec 21, 2020

I'd like to try and use buildbarn, but I've got an ARM cluster. Could using docker buildx make build barn work on ARM?

I don't think docker buildx is going to help us here in any way. Keep in mind that Buildbarn doesn't use Docker to build container images. It uses Bazel's rules_docker. Unfortunately, rules_docker doesn't support multi-arch containers yet. In my opinion this is a prerequisite for offering prebuilt images, as it becomes unmanageable otherwise.

I've just gone ahead and enabled CI builds for 32- and 64-bit ARM, meaning that you can now download prebuilt executables for those platforms by going to the 'Actions' tab for the respective repositories on GitHub. You should now also be able to build your own ARM container images by checking out any of the bb-* repositories and running something like this:

bazel run --platforms=@io_bazel_rules_go//go/toolchain:linux_arm64 //cmd/bb_storage:bb_storage_container
docker tag bazel/cmd/bb_storage:bb_storage_container mytag
docker push mytag

I'll keep this issue report open as a reminder that we should add multi-arch container images.

@EdSchouten EdSchouten changed the title Use docker buildx to support ARM Provide multi-arch container images Dec 21, 2020
@thesayyn
Copy link

@EdSchouten we started https://github.com/bazel-contrib/rules_oci as an alternative to rules_docker. Since rules_docker is basically unmaintained, I'd like to offer to migrate buildbarn from rules_docker to rules_oci which supports multi-arch out-of-the-box

@EdSchouten
Copy link
Member

Hey! That sounds great! PRs are welcome! Probably best to start off with bb_storage?

@thesayyn
Copy link

Hey! That sounds great! PRs are welcome! Probably best to start off with bb_storage?

Great. yeah, that sounds like a great start.

@thesayyn
Copy link

hey @EdSchouten buildbarn/bb-storage#167 is up. looking forward to your feedback

@CaerusKaru
Copy link

@EdSchouten can this now be closed?

@EdSchouten
Copy link
Member

Yes!

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

No branches or pull requests

4 participants