Skip to content

fix(docker): build on Linux ARM64 and include mcp/ module - #9328

Open
aguanitallc wants to merge 1 commit into
jo-inc:masterfrom
Aguanita-LLC:fix/arm64-docker-build
Open

fix(docker): build on Linux ARM64 and include mcp/ module#9328
aguanitallc wants to merge 1 commit into
jo-inc:masterfrom
Aguanita-LLC:fix/arm64-docker-build

Conversation

@aguanitallc

Copy link
Copy Markdown

Problem

The Docker image fails to build and run on Linux ARM64 (aarch64) hosts (e.g. Oracle Ampere, Raspberry Pi):

  1. better-sqlite3 fails at runtime — the shipped prebuildify binary prebuilds/linux-arm64.node is linked against glibc 2.38, but the node:22-slim base (Debian bookworm) ships glibc 2.36, so loading it throws GLIBC_2.38 not found.
  2. No toolchain in the base imagenode:22-slim has no make/g++, so even when the prebuild doesn't match, node-gyp can't compile a fallback.
  3. mcp/ is not copiedlib/cookies.js imports /app/mcp/lib/cookies.mjs, but the Dockerfile never COPY mcp/, so the persistence plugin fails to load with ERR_MODULE_NOT_FOUND.

Fix

  • Add build-essential + python3 to the base image.
  • Drop better-sqlite3's prebuilds and compile from source (npm run build-release) against the container's own glibc, so the native module always matches the target platform.
  • COPY mcp/ ./mcp/.

Testing

Built and ran on Linux aarch64 (Oracle Ampere):

  • camoufox launched cleanly (no glibc error).
  • POST /tabs + GET /tabs/:id/snapshot returned real page content with element refs.
  • The persistence plugin loads without error.

1. Add build-essential + python3 so native modules (better-sqlite3) can compile.

2. Compile better-sqlite3 from source: the shipped linux-arm64 prebuild needs glibc 2.38, but node:22-slim (Debian bookworm) ships 2.36, so it fails to load at runtime.

3. COPY mcp/ so the persistence plugin can load (lib/cookies.js imports /app/mcp/lib/cookies.mjs).
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.

1 participant