Conversation
The Dockerfile already selects per-architecture native packages, but nothing exercised the ARM64 path, so it could regress unnoticed and Apple Silicon support was undocumented. Add a Docker workflow that builds the image for linux/amd64 and linux/arm64 on native runners, then verifies each image reports the expected architecture, loads the LanceDB and better-sqlite3 native modules, and serves /healthz. Native runners rather than QEMU: esbuild is a Go binary and aborts under qemu-user with 'fatal error: lfstack.push' during the Vite build. Closes joungminsung#4
There was a problem hiding this comment.
Pull request overview
Adds CI coverage to ensure the repo’s Docker image is continuously built and smoke-tested on both linux/amd64 and linux/arm64, preventing silent regressions in native-module and runtime startup paths. Also documents how to build/publish multi-arch images for end users (including Apple Silicon).
Changes:
- Introduces a new GitHub Actions workflow to build and verify Docker images on native amd64 + arm64 runners.
- Adds README documentation (EN + KO) about architecture support and multi-platform
buildxusage.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| README.md | Documents amd64/arm64 support and multi-platform Docker build guidance. |
| README.ko.md | Korean translation of the new architecture + buildx documentation. |
| .github/workflows/docker.yml | New CI workflow to build and verify Docker images on amd64 and arm64 runners. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+559
to
+567
| To produce a single image that serves both architectures: | ||
|
|
||
| ```bash | ||
| docker buildx build --platform linux/amd64,linux/arm64 -t opendocuments:latest . | ||
| ``` | ||
|
|
||
| A multi-platform build produces a manifest list rather than a single image, so | ||
| add `--push` to publish it to a registry. For local use, build one platform at a | ||
| time with `--load`. |
Comment on lines
+563
to
+570
| 두 아키텍처를 모두 지원하는 단일 이미지를 만들려면: | ||
|
|
||
| ```bash | ||
| docker buildx build --platform linux/amd64,linux/arm64 -t opendocuments:latest . | ||
| ``` | ||
|
|
||
| multi-platform 빌드는 단일 이미지가 아니라 manifest list를 생성합니다. registry에 게시하려면 `--push`를 추가하세요. 로컬에서 사용하려면 `--load`와 함께 한 번에 하나의 platform만 빌드하세요. | ||
|
|
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.
Summary
Adds a
Dockerworkflow that builds the image forlinux/amd64andlinux/arm64and verifies each one actually works, plus docs for building a multi-platform image.One note on the issue's premise: the Dockerfile is not x86-only today. The
case "$node_arch"block added in 6358786 already installs thearm64Rollup/LanceDB packages, andoptionalDependenciesalready lists@lancedb/lancedb-linux-arm64-gnu. I built and ran the image on an M-series Mac with no changes and it works. So the real gap was that nothing exercised the ARM64 path — it could regress silently — and nothing documented it. This PR closes that gap rather than changing the Dockerfile.Type of Change
Related Issue
Closes #4
Why native runners instead of
--platform linux/amd64,linux/arm64The issue suggests a single QEMU build with both platforms. I tried that first and it does not work reliably: esbuild is a Go binary, and Go binaries abort under
qemu-userpartway through the Vite build.So the workflow builds each platform on a native runner instead —
ubuntu-latestfor amd64,ubuntu-24.04-armfor arm64 (free for public repos). This is also much faster than emulating the monorepo build.docker buildx build --platform linux/amd64,linux/arm64is still the right command for a user on their own machine, and it is what the README now documents.Test Plan
Verified locally on an Apple Silicon Mac (
linux/arm64, built natively):docker buildx build --platform linux/arm64— succeedsdocker image inspect --format '{{.Architecture}}'→arm64require('@lancedb/lancedb')andbetter-sqlite3load and run a real query inside the container →arch: arm64,sqlite rows: 1GET /healthzreturns{"status":"ok"}withHEALTHCHECKreportinghealthy, using no model config (it degrades to stub models and still serves)These are exactly the three checks the workflow runs, so amd64 gets the same treatment on a native x86 runner. I could not verify the amd64 leg locally for the QEMU reason above — that one runs for the first time on this PR.
.github/workflows/docker.ymlpassesactionlint.Notes
main/tags, I'm happy to add that; I left it out since it's a packaging decision that's yours to make.paths:filters keep it off doc-only PRs.