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

Build brew docker image for x86 and arm64 #18489

Closed
wants to merge 1 commit into from

Conversation

HeroCC
Copy link
Contributor

@HeroCC HeroCC commented Oct 3, 2024

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

When opening the brew repository with VSCode on am M1 Mac, it prompted me to reopen the window in a devcontainer. I agreed, then that devcontainer failed to startup, saying there was no such image. Attempting to pull manually resulted in this:

❯ docker pull ghcr.io/homebrew/brew:latest
latest: Pulling from homebrew/brew
no matching manifest for linux/arm64/v8 in the manifest list entries

This PR will build the linux/arm64 image in parallel with the amd64 image, allowing arm-based macs (and any other arm64-based system) to use the brew container.

@HeroCC
Copy link
Contributor Author

HeroCC commented Oct 3, 2024

Looks like the https://github.com/docker/setup-qemu-action is not whitelisted. Could someone add that to the repository settings? It is created and published by the official Docker team / namespace.

https://github.com/Homebrew/brew/actions/runs/11167051891

@HeroCC HeroCC marked this pull request as ready for review October 3, 2024 18:08
@MikeMcQuaid
Copy link
Member

This PR will build the linux/arm64 image in parallel with the amd64 image, allowing arm-based macs (and any other arm64-based system) to use the brew container.

Homebrew does not support linux/arm64 so we shouldn't be building this image either, sorry.

@MikeMcQuaid
Copy link
Member

When opening the brew repository with VSCode on am M1 Mac, it prompted me to reopen the window in a devcontainer.

This devcontainer exists purely for GitHub Codespaces. If there's a way to disable this alert: we should do that, instead.

@Bo98
Copy link
Member

Bo98 commented Oct 3, 2024

❯ docker pull ghcr.io/homebrew/brew:latest
latest: Pulling from homebrew/brew
no matching manifest for linux/arm64/v8 in the manifest list entries

Adding arm64 will require further work such as building arm64 bottles for everything. The best solution for now is to supply --platform linux/amd64 to docker pull so that it uses Docker's in-built emulation (or Rosetta).

This used to happen by default but this unfortunately regressed when we moved to the Docker GitHub Actions, probably because of the way attestations work.

@MikeMcQuaid MikeMcQuaid closed this Oct 4, 2024
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.

3 participants