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

Update ARM build docs #723

Merged
merged 3 commits into from
Jun 12, 2024
Merged

Update ARM build docs #723

merged 3 commits into from
Jun 12, 2024

Conversation

runesoerensen
Copy link
Contributor

Updating the ARM build docs to reflect pack build --platform support introduced in pack v0.34.0.

Signed-off-by: Rune Soerensen <rsoerensen@salesforce.com>
@runesoerensen runesoerensen requested a review from a team as a code owner June 5, 2024 22:21
Signed-off-by: Rune Soerensen <rsoerensen@salesforce.com>
@runesoerensen runesoerensen changed the title Update build-for-arm.md Update ARM build docs Jun 5, 2024

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:
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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

Copy link
Member

@AidanDelaney AidanDelaney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AidanDelaney AidanDelaney merged commit 5bc2c91 into buildpacks:main Jun 12, 2024
2 checks passed
github-actions bot pushed a commit that referenced this pull request Jun 12, 2024
* Update build-for-arm.md

Signed-off-by: Rune Soerensen <rsoerensen@salesforce.com>

* Add PHP to list of buildpacks

Signed-off-by: Rune Soerensen <rsoerensen@salesforce.com>

---------

Signed-off-by: Rune Soerensen <rsoerensen@salesforce.com>
Co-authored-by: Aidan Delaney <adelaney21@bloomberg.net>
AidanDelaney added a commit that referenced this pull request Jun 17, 2024
* Update build-for-arm.md

Signed-off-by: Rune Soerensen <rsoerensen@salesforce.com>

* Add PHP to list of buildpacks

Signed-off-by: Rune Soerensen <rsoerensen@salesforce.com>

---------

Signed-off-by: Rune Soerensen <rsoerensen@salesforce.com>
Co-authored-by: Aidan Delaney <adelaney21@bloomberg.net>
Signed-off-by: Aidan Delaney <adelaney21@bloomberg.net>
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

2 participants