Skip to content

Tell Mac users which samples need Rosetta - #145

Merged
paolosalvatori merged 1 commit into
mainfrom
devx-1248-apple-silicon-notes
Oct 27, 2026
Merged

paolosalvatori merged 1 commit into
mainfrom
devx-1248-apple-silicon-notes

Conversation

@paolosalvatori

@paolosalvatori paolosalvatori commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

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 logged qemu: uncaught target signal 11 (Segmentation fault) - core dumped and 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 its oryx tool 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's ubuntu-22.04-arm runners 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.sh stated 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

  • A note for Mac users in 22 sample READMEs, at the end of Prerequisites:
    • The 16 code-deployed web app samples (every web-app-* except web-app-custom-image, plus eventhubs and url-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-database adds that Microsoft does not test or support SQL Server under emulation.
    • The 6 Function App samples (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.
  • Top-level README, architecture section: Rosetta is a setting (Apple Virtualization framework only; Docker VMM has none), and Docker Desktop uses QEMU otherwise. Adds a note for Mac users and the missing url-shortener and eventhubs-eventgrid rows. Corrects servicebus/java: it runs its Spring Boot app on the host (mvn spring-boot:run) and needs no azure-app-service/java image.
  • 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 -s is Darwin and the host is arm64).

Tests

  • bash -n run-samples.sh passes, and ./run-samples.sh --list prints the same 77 entries before and after the change, so the CI matrix is unchanged.
  • No sample script or template changed, so no deployment was rerun.
  • Every image named as amd64-only was checked against its registry manifest (docker buildx imagetools inspect).
  • The Docker Desktop settings were checked against Docker's settings reference and VMM page. The SQL Server statement is quoted from Microsoft Learn.
  • Not tested: a Mac with Apple silicon, with Rosetta or with QEMU.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01NGfV8ZhpdZCZfbmfwWd3Sw

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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/java runs on the host.
  • Adds an Apple-silicon Mac notice to run-samples.sh and 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

1 inactive deployment
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.

2 participants