Adding linux/arm64 platform to docker build-push-action #91
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.
Summary
Adding linux/arm64 platform to docker build-push-action
Also merged in the changes from #55 (CC: @Lissy93 )
Additional Resources / Context
Turns out building a
arm64
image for yarn projects on GitHub runners is less-easy than one might suspect. Specifically...Issue:
yarn install
timeoutsI encountered timeout issues pulling yarn dependencies, ultimately due to the emulation from QEMU. This can be worked around via extending the timeout to something long.
Solution: Adding
--frozen-lockfile --network-timeout 100000
in theDockerfile
Issue: missing python
I also encountered issues that python was missing from the path. A quick internet search showed that having
apt
install this would likely resolve the issue.Solution: Adding
python make g++
in theDockerfile
(and, also merging in the changes from #55 )Resources
Below are some links/resources I found that helped me address these issues:
Details / Testing
I forked this repo to my own -> https://github.com/ChrisCarini/web-check (I may only keep this fork around for the life of this PR), changed .github/workflows/docker.yml#18 to be my
DOCKER_USER
then ran the workflow.Before
Before the change in this PR, the workflow succeeded, publishing an image with the single expected os/arch (
linux/amd64
):After
I incorporated the change in this PR, and re-ran the workflow, which succeeded. As you can see below, the image was published with the two expected os/arch (
linux/amd64
andlinux/arm64
):Bug(s)
Fixes #73