fix: skip node --version check under QEMU emulation in agent Dockerfile#3136
Conversation
Node.js 22.22.2 segfaults when running under QEMU arm64 emulation (buildkit_qemu_emulator), causing the agent Docker image arm64 build to fail during the release workflow. The fix detects QEMU emulation via /dev/.buildkit_qemu_emulator and skips the node --version verification, falling back to dpkg package verification instead. The apt-get install succeeding is sufficient proof the package installed correctly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔬 Smoke Test: Copilot BYOK (Offline) Mode
Running in BYOK offline mode ( Overall: PARTIAL — BYOK inference works, but pre-step data was not injected and GitHub MCP is unauthenticated. Workflow needs /cc @lpcox
|
🔬 Smoke Test Results
Overall: FAIL — GitHub MCP returned 401; pre-step smoke data was not injected into the prompt.
|
There was a problem hiding this comment.
Pull request overview
Updates the agent image build to avoid running the arm64 node binary during buildx cross-builds under QEMU emulation, which can segfault and break the release workflow’s linux/arm64 image build.
Changes:
- Detects QEMU emulation during
docker buildand skips the pre-existing Node 22 presence check to force a clean install. - Replaces the post-install
node --versionverification with a package-based check when under QEMU. - Preserves the existing native-build verification behavior (
node --version/npx --version).
Show a summary per file
| File | Description |
|---|---|
containers/agent/Dockerfile |
Adds QEMU detection and adjusts Node.js verification logic to prevent node --version from running under emulation. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 1
| # Verify Node.js 22 was installed correctly (skip under QEMU — node segfaults) | ||
| if [ "$UNDER_QEMU" = "true" ]; then \ | ||
| echo "Skipping node --version check (QEMU emulation detected)" && \ | ||
| dpkg -l nodejs | grep -q "22\." || (echo "ERROR: nodejs 22 package not installed" && exit 1); \ |
Smoke Test Results
Overall: FAIL — 2/3 tests passed
|
Smoke Test Results
Overall status: FAIL Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "localhost"See Network Configuration for more information.
|
🏗️ Build Test Suite Results
Overall: 7/8 ecosystems passed — ❌ FAIL ❌ Failure DetailsJava (gson, caffeine) — Both projects failed because Maven cannot download dependencies from This appears to be a network isolation issue: Maven needs access to the Maven Central repository but the sandbox does not allow outbound connections to
|
|
Smoke Codex: FAIL Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Smoke Test Results
Overall: FAIL
|
Problem
The Release workflow fails at the "Build Agent Image" job when building the
linux/arm64image. Node.js 22.22.2 segfaults when running under QEMU arm64 emulation:Failed run: https://github.com/github/gh-aw-firewall/actions/runs/25843758602/job/75934292564
Root Cause
The
node --versionverification check in the Dockerfile runs the Node.js binary duringdocker buildxcross-compilation. Under QEMU emulation (x86_64 host building arm64 image), the arm64 Node.js binary segfaults — this is a known QEMU/Node.js incompatibility.Fix
Detect QEMU emulation via
/dev/.buildkit_qemu_emulator(injected by BuildKit) and:node --versioncheck (always install fresh)node --versionverification withdpkg -l nodejspackage checkThe
apt-get install -y nodejssucceeding is sufficient proof the package installed correctly; thedpkgcheck confirms the right version was unpacked.