rules_docker
rules_docker copied to clipboard
Add support for pulling docker images on Apple Silicon
PR Checklist
Please check if your PR fulfills the following requirements:
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:
What is the current behavior?
Currently, rules_docker
gives an error when an image is pulled on Apple Silicon hardware (M1).
What is the new behavior?
This PR adds support for the docker puller on Apple Silicon.
Does this PR introduce a breaking change?
- [ ] Yes
- [x] No
Other information
Before this PR is merged, the maintainers of rules_docker
should build the binary, upload it to https://storage.googleapis.com/rules_docker/ and change the relevant URL. The current binaries https://github.com/ray-project/rules_docker/releases/download/darwin-arm64/puller-darwin-arm64 have been built on the author's laptop with
bazelisk build @io_bazel_rules_docker//container/go/cmd/puller:puller
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
For more information, open the CLA check for this pull request.
As a workaround, this works if Rosetta is installed.
The issue here is that bazel fails without asking to install Rosetta, so this is a bit intransparent. Rosetta can be installed by hand through /usr/sbin/softwareupdate --install-rosetta --agree-to-license
(see https://machow2.com/rosetta-mac/ for more info).
So I'd love to see this merged!
Oh, I didn't even realise this wasn't a thing. I'd like to see this change merged too.
what is blocking this PR?
Basically somebody from Google hosting the M1 binaries of the docker puller I think :)
And merging it of course.
I'd love to see that happen :)
Same here, but I'm not sure who to reach out to concerning the hosting situation.
I suspect we should include the binaries along-side a GitHub release.
In which case the only blocker for this PR would be to update the GitHub actions yaml to do so.
In that case, looks like all that's needed would be to remove
- os: darwin
cpu: arm64
from the excludes definition in .github/workflows/add_binaries_to_release.yml:23
@pcmoritz Are you still able to push the needed changes to your branch?
@pcmoritz any eta on landing this pr? :)
https://github.com/bazelbuild/rules_docker/pull/2169 👀
This Pull Request has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_docker!
This PR was automatically closed because it went 30 days without a reply since it was labeled "Can Close?"