Skip to content

Fix Docker x64 runner architecture mismatch on ARM hosts#19

Merged
depoll merged 1 commit intomainfrom
fix/docker-x64-arch-mismatch
Feb 22, 2026
Merged

Fix Docker x64 runner architecture mismatch on ARM hosts#19
depoll merged 1 commit intomainfrom
fix/docker-x64-arch-mismatch

Conversation

@depoll
Copy link
Copy Markdown
Owner

@depoll depoll commented Feb 22, 2026

Summary

  • enforce Docker image architecture checks after pull and after architecture-specific retagging
  • force Docker container creation to use the requested platform (linux/amd64 or linux/arm64)
  • add backend unit tests for architecture normalization and mismatch failure behavior

Validation

  • npm run typecheck -w backend
  • npm run test -w backend -- tests/dockerRunner.test.ts
  • PORT=40123 npm run test -w backend

Note

Medium Risk
Changes affect runner provisioning and Docker image selection; failures will now surface earlier as hard errors if images/platforms don’t match, which could impact deployments with custom images/tags.

Overview
Fixes Docker-based GitHub Actions runners on mixed-arch hosts by normalizing and enforcing image architecture during pullRunnerImage, failing fast if the pulled or retagged image doesn’t match the requested amd64/arm64.

Forces container creation to use the requested linux/<arch> platform (via createContainer({ platform })) to avoid accidental host-arch execution. Adds Vitest coverage for architecture normalization and mismatch errors.

Written by Cursor Bugbot for commit 1959e3e. This will update automatically on new commits. Configure here.

Ensure requested Docker runner architecture is actually used by validating pulled/tagged image architecture and forcing container platform during create.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 22, 2026 09:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens Docker runner provisioning on ARM hosts by explicitly enforcing image architecture correctness and ensuring containers are created using the requested Docker platform, preventing x64/arm64 mismatch failures.

Changes:

  • Add architecture alias normalization and a reusable architecture mismatch assertion for Docker images.
  • Verify image architecture both after pulling the base image and after retagging to an architecture-specific tag.
  • Force dockerode.createContainer to target the requested linux/amd64 or linux/arm64 platform, and add unit tests for the new helpers.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
backend/src/services/dockerRunner.ts Introduces architecture normalization/assertion helpers, enforces image-arch checks after pull/tag, and sets container creation platform.
backend/tests/dockerRunner.test.ts Adds Vitest coverage for architecture alias normalization and mismatch error behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@depoll depoll merged commit 0050936 into main Feb 22, 2026
9 checks passed
@depoll depoll deleted the fix/docker-x64-arch-mismatch branch February 22, 2026 09:11
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