-
Notifications
You must be signed in to change notification settings - Fork 166
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
Update ARM build docs #723
Conversation
Signed-off-by: Rune Soerensen <[email protected]>
Signed-off-by: Rune Soerensen <[email protected]>
|
||
If you want to build an ARM64 image from a different host architecture, you can use the arch-specific builder tag: `heroku/builder:24_linux-arm64`: | ||
If you want to build an ARM64 image from a different host architecture, use the `--platform` parameter: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does building a linux/arm64
image on a linux/amd64
host would require some form of arm64
emulator? I know we can assemble the images. But does building work in the general case? For example, if I'm building a Python application that, in turn, needs to compile a C library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand you correctly, I think the answer to both your questions is yes -- building an linux/arm64
image on a linux/amd64
host does require an emulator capable of emulating/virtualizing a different architecture (like Docker :)), and building should generally work - also if a user needs to compile a C library.
Running pack build
with the --builder heroku/builder:24 --platform linux/arm64
parameters is equivalent to using the arch-specific heroku/builder:24_linux-arm64
builder tag currently in the docs, and the builder will be the same either way.
However, the only reason to use --builder heroku/builder:24_linux-arm64
(and the reason we added arch-specific tags) was that pack build
didn't allow specifying a --platform
for multi-arch builders until just recently. It was a bit of a hack which, since the introduction of pack v0.34.0, is fortunately no longer necessary! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah great. I'll land this. But it would be also nice to have a list of builders that support ARM in this doc (simply because ARM support is still a little rare).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Update build-for-arm.md Signed-off-by: Rune Soerensen <[email protected]> * Add PHP to list of buildpacks Signed-off-by: Rune Soerensen <[email protected]> --------- Signed-off-by: Rune Soerensen <[email protected]> Co-authored-by: Aidan Delaney <[email protected]>
* Update build-for-arm.md Signed-off-by: Rune Soerensen <[email protected]> * Add PHP to list of buildpacks Signed-off-by: Rune Soerensen <[email protected]> --------- Signed-off-by: Rune Soerensen <[email protected]> Co-authored-by: Aidan Delaney <[email protected]> Signed-off-by: Aidan Delaney <[email protected]>
Updating the ARM build docs to reflect
pack build --platform
support introduced inpack v0.34.0
.