listmonk
listmonk copied to clipboard
arm64 arch CPU support in binary and docker
Whatever AWS graviton2 or new apple M1, ARM CPU becomes more popular. It is great if the docker can provide ARM64 compatible version, same in binary (although I don't need that).
@mr-karan would you like to take a look at this?
I'm currently working on porting this to ARM and in the testing phase as we speak
I am currently stumped on this error
> [2/6] RUN apk --no-cache add ca-certificates tzdata:
#7 0.224 exec /bin/sh: exec format error
I am working on a fix though, just very slowly cause this should work
Ah great. The packages ca-certificates, tzdata don't support ARM. @knadh Do you know any workaround you know for this?
I'm not familiar with Alpine, unfortunately. @mr-karan?
FYI, I run listmonk on arm64 hardware since a few months using a Docker container.
I made a multi-stage Dockerfile in order to embed all the build steps inside: https://github.com/nemunaire/listmonk/commit/a8c7c2a5d92091883ab4fef5ac888812175d6431
I run the Dockerfile to build the image directly on the host (where there is no npm, make, go, ...). I didn't make a PR as I think this is not the way you want to do that.
I can't help as I didn't know goreleaser, but most probably, the error:
#7 0.224 exec /bin/sh: exec format error
is because the docker image architecture is not the same as the hardware architecture who run the build (eg. image is arm64 and hardware is amd64). Without qemu it's not possible to do any RUN if architectures are not the same.
(With my all-in-one Dockerfile, the common solution is to use docker buildx with github actions this way: https://github.com/ddvk/rmfakecloud/blob/master/.github/workflows/release.yml#L50)
Yeah, buildx is also one way to solve this.
With goreleaser, however it's possible to also use docker manifest and create a multi-arch image: https://goreleaser.com/customization/docker_manifest/. Manifest is basically some meta information about the image (and in this context, OS and Arch is what we're interested in). This also uses buildx internally to build the image.
Ah great. The packages ca-certificates, tzdata don't support ARM
Regarding ca-certificates, can you try this fix? https://stackoverflow.com/a/70771488/709452 @alf1e
I couldn't find much information about tzdata not working on alpine with ARM. Can you share a detailed error message?
Sidenote: I also think it's okay to switch to Ubuntu base for AMD/ARM architectures. The base size of an Ubuntu image is small enough and we don't have to worry about compatibility of packages, but we can keep that as a separate PR.
Let me know if you get stuck somewhere, would be happy to debug and help!
any updates?
I really wanna run this on my Pi :S
I experience the same issue with Oracle instances with ARM CPU. I would be great if ARM64 is supported.
Now that #1249 has been merged, is there a possibility of doing a point release? (2.4.1), so we can start using the binaries
Hi @navanchauhan. Doing a release just for this will cause every existing installation to do display a perpetual update prompt.
Why don't you try compiling it yourself for the time being?
Hi @navanchauhan. Doing a release just for this will cause every existing installation to do display a perpetual update prompt.
Why don't you try compiling it yourself for the time being?
Makes sense.
My install script https://github.com/YunoHost-Apps/listmonk_ynh is currently compiling everything from scratch. The lower powered systems like Raspberry Pi 3/4 (2GB), run out of memory while running yarn install because of how much resources Node takes.
For now everything is working, I'll just update it to use the binary whenever they are released. In the meanwhile, I'll also try and make a PR for getting the docker images working
Any news on this, or anything I could help with? It's currently the only thing stopping me from moving to an ARM server. 😬
I've added multiarch support for listmonk in this PR: https://github.com/knadh/listmonk/pull/1344
For the time being you can build it locally using goreleaser with the following command:
$ goreleaser release --clean --snapshot
--snapshot will ensure that it doesn't try to push to remote.
I've tested the images locally, but feel free to try it out and let me know if you have any issues.
I guess this issue can be closed as successfully done. The latest binaries and Docker images support ARM. Many thanks!!!!