Skip to content

fix(docker): add multi-arch (amd64/arm64) Docker build support - #130

Open
MuhammadAbeerAkmal wants to merge 3 commits into
NFDI4Chem:developmentfrom
MuhammadAbeerAkmal:arm-build-support
Open

fix(docker): add multi-arch (amd64/arm64) Docker build support#130
MuhammadAbeerAkmal wants to merge 3 commits into
NFDI4Chem:developmentfrom
MuhammadAbeerAkmal:arm-build-support

Conversation

@MuhammadAbeerAkmal

Copy link
Copy Markdown

Problem: The nmrkit Docker image only works on amd64 machines right now. It doesn't run on arm64 machines, like Apple Silicon Mac (M2) etc. houdini69 on #110 ran into this issue and just want nmrkit to work on his machine.

What change in this PR:

  • Dockerfile: JAVA_HOME is hardcoded to .../java-17-openjdk-amd64/, which would silently point at a non-existent path when built for arm64 (Debian installs the arm64 JDK under .../java-17-openjdk-arm64/). Added ARG TARGETARCH and switched the path to use it, so it resolves correctly per architecture.
  • dev-build.yml / prod-build.yml: added a docker/setup-qemu-action@v3 step (needed so GitHub's amd64 runners can emulate arm64 during the build) and platforms: linux/amd64,linux/arm64 on the main nmrkit image build step.

Testing: Verified the Dockerfile still builds locally for amd64. Haven't been able to test the arm64 build itself locally which will need to run in CI.

@NishaSharma14: New to this repo! It would be nice if you please review it.

@MuhammadAbeerAkmal
MuhammadAbeerAkmal changed the base branch from main to development July 30, 2026 17:11
@NishaSharma14
NishaSharma14 requested a lite review from Copilot August 13, 2026 10:50
@NishaSharma14
NishaSharma14 self-requested a review August 13, 2026 10:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds multi-architecture (amd64/arm64) Docker build support so nmrkit can run on arm64 hosts (e.g., Apple Silicon) by removing an amd64-specific JAVA_HOME assumption and enabling multi-platform builds in CI.

Changes:

  • Parameterize JAVA_HOME in the Dockerfile using TARGETARCH for per-arch JDK install paths.
  • Enable QEMU emulation and request linux/amd64,linux/arm64 builds in the dev and prod GitHub Actions workflows.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
Dockerfile Switches JAVA_HOME to an architecture-dependent path using TARGETARCH.
.github/workflows/dev-build.yml Adds QEMU setup and enables multi-platform builds for the main image.
.github/workflows/prod-build.yml Adds QEMU setup and enables multi-platform builds for the main image.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Dockerfile Outdated
Comment thread .github/workflows/prod-build.yml Outdated
Comment thread Dockerfile Outdated
Comment thread .github/workflows/dev-build.yml
@NishaSharma14

Copy link
Copy Markdown
Contributor

@MuhammadAbeerAkmal Thank you for your pull request. Can you please check the review comments by Copilot and check if they are relevant to be resolved?

@MuhammadAbeerAkmal

Copy link
Copy Markdown
Author

@NishaSharma14 I checked all four Copilot comments and they were relevant. Added a safe default for TARGETARCH, removed a dead export line, and confirmed Microsoft's Playwright base image does support arm64, so I extended multi-arch support to nmr-cli too rather than leaving it out of scope. Ready for review whenever you get a chance.

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.

3 participants