fix(docker): add multi-arch (amd64/arm64) Docker build support - #130
Open
MuhammadAbeerAkmal wants to merge 1 commit into
Open
fix(docker): add multi-arch (amd64/arm64) Docker build support#130MuhammadAbeerAkmal wants to merge 1 commit into
MuhammadAbeerAkmal wants to merge 1 commit into
Conversation
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.
Problem: The
nmrkitDocker 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 wantnmrkitto work on his machine.What change in this PR:
Dockerfile:JAVA_HOMEis 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/). AddedARG TARGETARCHand switched the path to use it, so it resolves correctly per architecture.dev-build.yml/prod-build.yml: added adocker/setup-qemu-action@v3step (needed so GitHub's amd64 runners can emulate arm64 during the build) andplatforms: linux/amd64,linux/arm64on the mainnmrkitimage 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.