devture / exim-relay

🐳 A lightweight non-root Docker image for an Exim mail relay, based on Alpine Linux.
Apache License 2.0
38 stars 34 forks source link

arm64 #2

Closed drpaneas closed 3 years ago

drpaneas commented 3 years ago

Can you provide builds for Raspberry Pi 4?

spantaleev commented 3 years ago

Seeing your matrix-sto-spiti project.

If you're using this image as part of matrix-docker-ansible-deploy, then the playbook automatically builds this Docker image on the device itself due to matrix_mailer_container_image_self_build: "{{ matrix_architecture != 'amd64' }}" that we have in group_vars/matrix_servers.

As of this writing, I'm building all these images manually (I know, I should set up some build pipeline) and I haven't spent time into figuring out how to build an ARM image (or better yet, a multi-arch Docker image), so providing Raspberry Pi 4 images is a little difficult.

drpaneas commented 3 years ago

I ma using RPi4 (that is aarch64) using "Ubuntu 20.04.1 LTS" and the ansible didn't build any of the images. In a matter of fact it tried to install docker-ce, while I had docker.io (from the official repository) already present. I had to build manually 4 images for the following services:

/etc/systemd/system/matrix-coturn.service /etc/systemd/system/matrix-ma1sd.service /etc/systemd/system/matrix-mailer.service /etc/systemd/system/matrix-client-element.service

And change the tag to a few others since ansible picked the amd64 versions and they didn't work on my rpi4 (obviously).

Well, the good thing is that eventually I've managed to make it work, so there two things missing here:

  1. Add Support for Ubuntu 20.04.1 LTS for aarch64 devices (such as RPi 4)
  2. Rebuild all the images who don't have support for this architecture.

What I can do is:

  1. to create a fork repo of each image that needs to be built in the aarch64 architecture
  2. use a github-action like Fork Sync to keep my fork always (and automatically) up to date with the original repo of the image.
  3. Provide my Raspberry Pi 4 as a dedicated GitHub runner for building the images.
  4. Use another GitHub action to publish the artifact (the image for aarch64) in dockerhub.

Then, I need to spend some time reading the ansible so I can submit a PR by supporting Ubuntu 20.04 on Raspberry including my images.

WDYT?

spantaleev commented 3 years ago

We support ARM32 and ARM64 for many of our images, either through building images on the device itself (during playbook execution) or by pulling an alternative image for the architecture you're running.

Take a look at this:

matrix_architecture: "arm64" should be enough to make you go a long way. Not all components support self-building (or pulling a ready-made image), but most do.

I suggest you:


To prevent the playbook from trying to install docker-ce on your machine, you can use this: matrix_docker_installation_enabled: false

drpaneas commented 3 years ago

works like a charm; thanks