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

Fix arm64 build for m1 with docker-desktop #332

Closed
wants to merge 2 commits into from

Conversation

gh7531
Copy link

@gh7531 gh7531 commented Mar 2, 2022

I needed to build a Grafana image that had to run on an M1 with docker-desktop. Therefore, I tried to build using the command suggested in #65 (comment), but it failed during packaging Unknown token 'armv6' in 'node14-linux-armv6'.
I looked into the package_target.sh and saw that the arm64 architecture was mapped to armv6 which seems to be the issue. Changing this to arm64 allowed me to build for linux-arm64-glibc.

Then I build a Grafana docker image on my m1 mac using docker-desktop and the plugin seemed to work.
image

Note:

  • I only tested this on my m1 mac with docker-desktop
  • I only tested the version with a bundled chromium
  • I don't know if this change breaks other setups, since I don't have access to other systems.

@ArturWierzbicki
Copy link
Contributor

hey @gh7531, thanks a lot for the contribution! Have you tried changing the arch in the Makefile to darwin-arm64-unknown

ARCH = darwin-x64-unknown
?

I believe this already works on the master branch for local builds, but, unfortunately, it does not work for packages intended for distribution. (https://github.com/grafana/grafana-image-renderer/pull/326/files)

@gh7531
Copy link
Author

gh7531 commented Mar 15, 2022

Thank you! Building with ARCH=darwin-arm64-unknown works. I assumed, since I'm running in docker, I needed the linux version.

Is there a plan to distribute packages for arm64?

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@gh7531 gh7531 closed this Oct 17, 2022
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.

None yet

3 participants