-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Docker Hub: support arm64 builds #740
Comments
Just to add to this: CircleCI has native ARM support, which is why it's expected to work. If the self-hosted GitHub Actions runner solution is chosen, you still need three CI jobs, just like with CircleCI, because the |
So we can not specify something like... jobs:
build-and-push:
name: Build and push Docker image
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- application: smp-server
dockerfile: build.Dockerfile
- os: [ubuntu-latest, self-hosted]
... …to build all the images to one manifest on separate runners automagically? |
Actually yes, you could do something like that. Then you would only need two jobs, one with a matrix to build the images, and one for making the manifest. You could also use some Bash magic to get the architecture for the image tags, like so: ...
jobs:
build-and-push-images:
name: Build and push Docker image
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, self-hosted]
include:
- application: smp-server
dockerfile: build.Dockerfile
runs-on: ${{ matrix.os }}
steps:
...
- name: Get machine architecture for image tags
id: arch
run: |
if [ "$(uname -m)" = "x86_64" ]; then
echo "tag=amd64" >> "$GITHUB_OUTPUT"
elif [ "$(uname -m)" = "aarch64" ]; then
echo "tag=arm64" >> "$GITHUB_OUTPUT"
fi
- name: Extract metadata for Docker image
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.application }}
flavor: |
latest=auto
suffix=-${{ steps.arch.output.tag }},onlatest=true
tags: |
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
...
create-and-push-manifest:
name: Create and push Docker manifest
needs: build-and-push-images
... |
Hi, did you guys figure out how to build the server without OOM killing everything? I've tried building docker image on my machine with 16G RAM (8GB zram) and it killed all of my desktop processes. |
You could potentially ask for sponsorship for aarch64 VM's from https://osuosl.org/services/aarch64/ |
The good news is that arm runners are coming to Github. The bad news is that it will be available as private beta from January 2024 so probably another half a year or more from then to general availability. |
There's M1 runner available from today. I'm not sure how to integrate it fully to current workflow but if someone has an idea we could test and finally upload arm64 to DockerHub. |
@epoberezkin could you try? It looks like they added it today https://github.blog/changelog/2024-06-24-github-actions-ubuntu-24-04-image-now-available-for-arm64-runners/ |
in the meantime, is there a way to setup our docker-compose files to build it ourselves? |
I've built it many times in the past. If you have arm64 device then simply build it like described here https://github.com/simplex-chat/simplexmq?tab=readme-ov-file#using-docker-1. As for the compose you can just paste the docker run into some LLM and it will output the compose easily. I know because I've tried that on Perplexity. |
https://github.blog/changelog/2024-09-03-github-actions-arm64-linux-and-windows-runners-are-now-generally-available/ It's generally available but only on Team and Enterprise plans :( |
Currently, Docker workflow supports building and pushing only
amd64
images to Docker Hub, since compilingarm64
binaries withqemu
/docker
results in OOM, even on powerful machines with 32Gb RAM. Let's figure out the best way to supportarm64
.Currently, proposed solutions:
amd64
andarm64
respectfully and one for combining this images into manifest.Source: Multi-Arch Build With Docker Buildx and CircleCi
aarch64
hardware.arm
server.docker-image.yml
The text was updated successfully, but these errors were encountered: