Multiplatform docker build #6
Open
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.
This PR updates the github actions workflow to build the container both for amd64 and arm64 platforms.
Why is it necessary ?
I tried to install the MCP on my Mac, after having copied the configuration for opencode, I was surprised to see that it failed executing. Pulling manually the image showed me that the image was only built for amd64 architecture.
This cloud be overcomed by adding
--platform=linux/amd64to the mcp command, but it comes with two problems :Proposed solution with this PR
I updated the github actions workflow to build on a matrix of 2 machines
The workflow now does 2 base image build, wait for these two builds to complete and merge result in a single node, then build the two runtime images, then merge results and push the images for both amd64 and arm64 platforms.
Tests
I tested these builds on my fork. You can find the images built for both architecture there. I tested the two images on my computer.
You can now use the normal configuration for opencode without friction.