-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish linux/arm64 images #564
Comments
Yes, definitely :) (I work on arm64 a lot myself). I have looked at this one: https://www.meziantou.net/create-a-multi-arch-docker-image-for-a-dotnet-application.htm, but haven't got around to actually doing it yet. It is probably a lot easier now that we have M1 build agents available in github |
This one was a bit more complex than first thought, as there are no github actions runners that run on arm64 that have docker installed (the M1 agents don't have docker installed), so I'll need to migrate to using the dotnet publish to docker feature. This probably takes a bit more time, to make the image compatible |
Hi @erikbra, I was wondering if adding these two small changes to Dockerfile and build.yml workflow would enable building the docker image for Change to DockerfileDuring build of docker image the environment variables I think this should work as the GitHub Action runs on Altering this line grate/installers/docker/Dockerfile Line 12 in 38a36a3
With this line RUN dotnet publish ./src/grate/grate.csproj --os $TARGETOS --arch $TARGETARCH -c release --self-contained -p:SelfContained=true -o ./publish/app Change to build.yml workflowgrate/.github/workflows/build.yml Line 243 in 38a36a3
By adding - name: Build and push Docker image
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355
with:
file: ./installers/docker/Dockerfile
context: .
platforms: linux/amd64,linux/arm64 # add this line
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} More information you can find here https://docs.docker.com/build/ci/github-actions/multi-platform/ |
Is your feature request related to a problem? Please describe.
A number of developers are now doing .NET development on Windows and Mac machines that aren't x86. I've noticed that you do offer ARM64 builds of Grate but only x86 docker images. QEMU emulation is fairly slow and doesn't appear to be officially supported by the .NET framework. It would be great to have native ARM images to get rid of emulation layer entirely from our local development process.
Describe the solution you'd like
Grate should publish linux/arm64 images
Describe alternatives you've considered
Alternatively, you could provide Alpine packages which would be sufficient as well but slightly less convenient as mentioned in #81
Additional context
The text was updated successfully, but these errors were encountered: