rules_docker icon indicating copy to clipboard operation
rules_docker copied to clipboard

Add support for pulling docker images on Apple Silicon

Open pcmoritz opened this issue 2 years ago • 8 comments

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

pcmoritz avatar Mar 01 '22 07:03 pcmoritz

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.

google-cla[bot] avatar Mar 01 '22 07:03 google-cla[bot]

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!

tommyknows avatar Jun 02 '22 14:06 tommyknows

Oh, I didn't even realise this wasn't a thing. I'd like to see this change merged too.

uhthomas avatar Jun 07 '22 10:06 uhthomas

what is blocking this PR?

YazeedAlKhalaf avatar Aug 27 '22 15:08 YazeedAlKhalaf

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 :)

pcmoritz avatar Aug 28 '22 01:08 pcmoritz

Same here, but I'm not sure who to reach out to concerning the hosting situation.

clohr-vc avatar Aug 28 '22 09:08 clohr-vc

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.

uhthomas avatar Aug 28 '22 12:08 uhthomas

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?

clohr-vc avatar Aug 29 '22 08:08 clohr-vc

@pcmoritz any eta on landing this pr? :)

manan avatar Oct 09 '22 05:10 manan

https://github.com/bazelbuild/rules_docker/pull/2169 👀

connyay avatar Nov 18 '22 18:11 connyay

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!

github-actions[bot] avatar May 18 '23 02:05 github-actions[bot]

This PR was automatically closed because it went 30 days without a reply since it was labeled "Can Close?"

github-actions[bot] avatar Jun 17 '23 02:06 github-actions[bot]