FerretDB / FerretDB

A truly Open Source MongoDB alternative
https://www.ferretdb.com
Apache License 2.0
9.17k stars 401 forks source link

Build `arm/v6` Docker images, `.deb` and `.rpm` packages, and binaries #3354

Open arite opened 1 year ago

arite commented 1 year ago

After #2170 and goreleaser/nfpm#719, building packages and binaries for this architecture should be easy.


What should be done?

This is a request for ARMv6-compatible builds to be provided.

This would enable FerretDB to be run on ARMv6-based devices such as the Raspberry Pi Model B, Model B+, Zero and Zero W.

Currently attempting to run the ARMv7 build of FerretDB on a Raspberry Pi Zero W results in:

Illegal instruction

The FerretDB package ghcr.io/ferretdb/golang does not currently include a linux/arm/v6 compatible image which means building the Docker images currently fails. However, using the platform linux/arm/v6 does work with the official golang Docker image.

Currently the production, development and all-in-one Dockerfiles currently have the environment variable GOARM=7 explicitly set, so this would likely need changing/be parameterized. GOARM=6 can be used for an ARMv6 builds (reference: GoArm).

AlekSi commented 1 year ago

Let's do that. ~The only somewhat tricky part is that ENV GOARM=7 should be moved inside a shell script below with some autodetection.~ Actually, the autodetection should just work.

AlekSi commented 1 year ago

There is no arm/v6 image for gcr.io/distroless/static-debian11:debug. I have to revert it for now.

AlekSi commented 1 year ago

Blocked by #2179 and #2170