Repository navigation
Tell Mac users which samples need Rosetta - #145
Merged
Merged
Conversation
Every code deployment is built with Microsoft's Oryx build image, which is published for amd64 only and is a .NET app, and .NET does not support QEMU. On a Mac with Apple silicon, Docker Desktop emulates amd64 with QEMU unless Rosetta is turned on, and the build can then crash, as reported in #143. - Add a note to the Prerequisites of the 22 sample READMEs whose deployment depends on amd64-only images: the code-deployed web apps (Oryx build and runtime images, and SQL Server for web-app-sql-database) and the Function Apps (Oryx build image). - Rewrite the architecture section of the top-level README: Docker Desktop uses Rosetta only when its setting is on, and QEMU otherwise; add the missing url-shortener and eventhubs-eventgrid rows; servicebus/java runs its Spring Boot app on the host and needs no amd64-only image. - run-samples.sh: correct the architecture comments the same way, and print a Rosetta note when it runs on a Mac with Apple silicon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NGfV8ZhpdZCZfbmfwWd3Sw
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No blocking issues remain in the documentation updates or narrowly scoped Mac notice, and deployment behavior and CI selection are unchanged.
No open issues 🎉
What changed in this PR
Clarifies which LocalStack Azure samples need Rosetta on Apple silicon, addressing the Oryx build failure reported in #143 without changing deployment behavior or CI selection.
Changes:
- Adds Rosetta prerequisites to 22 sample READMEs, distinguishing build requirements from runtime requirements and noting SQL Server’s emulation limitations.
- Corrects the root architecture guidance, adds missing samples, and clarifies that
servicebus/javaruns on the host. - Adds an Apple-silicon Mac notice to
run-samples.shand updates its architecture comments.
| File | Description |
|---|---|
| samples/web-app-sql-database/python/README.md | Adds Rosetta guidance and SQL Server support caveat. |
| samples/web-app-sql-database/dotnet/README.md | Adds Rosetta guidance and SQL Server support caveat. |
| samples/web-app-postgresql-flexible-server/python/README.md | Documents web app build and runtime emulation requirements. |
| samples/web-app-postgresql-flexible-server/dotnet/README.md | Documents web app build and runtime emulation requirements. |
| samples/web-app-mysql-flexible-server/python/README.md | Documents web app build and runtime emulation requirements. |
| samples/web-app-mysql-flexible-server/dotnet/README.md | Documents web app build and runtime emulation requirements. |
| samples/web-app-managed-identity/python/README.md | Adds Rosetta prerequisites for the web app. |
| samples/web-app-managed-identity/dotnet/README.md | Adds Rosetta prerequisites for the web app. |
| samples/web-app-cosmosdb-nosql-api/python/README.md | Adds Rosetta prerequisites for the web app. |
| samples/web-app-cosmosdb-nosql-api/dotnet/README.md | Adds Rosetta prerequisites for the web app. |
| samples/web-app-cosmosdb-mongodb-api/python/README.md | Adds Rosetta prerequisites for the web app. |
| samples/web-app-cosmosdb-mongodb-api/dotnet/README.md | Adds Rosetta prerequisites for the web app. |
| samples/web-app-app-configuration/python/README.md | Adds Rosetta prerequisites for the web app. |
| samples/web-app-app-configuration/dotnet/README.md | Adds Rosetta prerequisites for the web app. |
| samples/url-shortener/python/README.md | Documents the web app’s Oryx emulation requirements. |
| samples/function-app-storage-http/dotnet/README.md | Distinguishes native function runtime from emulated build. |
| samples/function-app-service-bus/dotnet/README.md | Distinguishes native function runtime from emulated build. |
| samples/function-app-managed-identity/python/README.md | Adds Rosetta guidance for function builds. |
| samples/function-app-front-door/python/README.md | Adds Rosetta guidance for function builds. |
| samples/eventhubs/python/README.md | Documents the dashboard’s Oryx emulation requirements. |
| samples/eventhubs-eventgrid/python/README.md | Adds Rosetta guidance for function builds. |
| samples/api-management-function-app/python/README.md | Adds Rosetta guidance for function builds. |
| run-samples.sh | Updates architecture comments and prints a Mac-specific notice. |
| README.md | Corrects architecture guidance and expands the sample table. |
Review effort: Balanced
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
A user on a Mac with Apple silicon could not deploy
api-management-function-app/python(#143, localstack/lstk#564): the Oryx build container loggedqemu: uncaught target signal 11 (Segmentation fault) - core dumpedand the deployment never completed.The emulator builds every code deployment, Function Apps included, with Microsoft's Oryx build image (
mcr.microsoft.com/oryx/build). Microsoft publishes it for amd64 only (microsoft/Oryx#2133 asks for arm64), and itsoryxtool is a .NET 8 app. .NET does not support QEMU. Docker Desktop on Apple silicon emulates amd64 with Rosetta only when "Use Rosetta for x86_64/amd64 emulation on Apple Silicon" is on; otherwise it uses QEMU, and there the build can crash. Our arm64 CI never sees this: GitHub'subuntu-22.04-armrunners have no amd64 emulation, so the build fails at once and the emulator installs the Python dependencies natively.The READMEs said the opposite of what Mac users need. The top-level README and
run-samples.shstated that Docker Desktop on Apple silicon emulates amd64 with Rosetta, so these samples "do work on a Mac". No sample README mentioned Macs at all.The emulator side (the hung build, and the native fallback it skipped) is fixed separately in localstack-pro.
Changes
web-app-*exceptweb-app-custom-image, pluseventhubsandurl-shortener): the Oryx build and runtime images are amd64-only, so they need Docker Desktop's Rosetta emulation, and they are not expected to work under QEMU.web-app-sql-databaseadds that Microsoft does not test or support SQL Server under emulation.api-management-function-app,eventhubs-eventgrid,function-app-*): the function app runs natively, but its build runs on the amd64-only Oryx image, so turn on Rosetta.url-shortenerandeventhubs-eventgridrows. Correctsservicebus/java: it runs its Spring Boot app on the host (mvn spring-boot:run) and needs noazure-app-service/javaimage.run-samples.sh: the architecture comments say the same, and the script prints a Rosetta note when it runs on a Mac with Apple silicon (uname -sisDarwinand the host is arm64).Tests
bash -n run-samples.shpasses, and./run-samples.sh --listprints the same 77 entries before and after the change, so the CI matrix is unchanged.docker buildx imagetools inspect).Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01NGfV8ZhpdZCZfbmfwWd3Sw