nginxinc / docker-nginx

Official NGINX Dockerfiles
BSD 2-Clause "Simplified" License
3.23k stars 1.73k forks source link

current nginx releases fail to build on arm32v5 #919

Open thresheek opened 1 month ago

thresheek commented 1 month ago

Similarly to previously reported, in quickjs: https://github.com/nginxinc/docker-nginx/issues/881

thresheek commented 1 month ago

This happens because we don't really have an arm32v5 builder on our CI infra for NGINX packaging... We only support amd64 and aarch64. All the other arches just happen to be building fine.

This begs the question: do we really need arm32v5 to be supported by Debian-based images? The amount of work to support it is non-trivial and we don't have a good way to know of build problems beforehand. Should we drop the support for it?

Probably most common arm32v5 devices would be Raspberry Pi 1 & 2, and they're still sold...

thresheek commented 1 month ago

Currently, this is the process to update docker images for an architecture we don't test on:

  1. reproduce a fix with binfmt-based qemu emulation
  2. produce & review & push a patch fixing the issue to pkg-oss
  3. rebuild packages for amd64/aarch64 and publish them to nginx.org/packages/ (possibly for both stable/mainline)
  4. point docker-nginx update.sh to a new hg revision
  5. issue a PR to docker-library/official-images to pick up the changes

Note that step 3/ here affects all the arches even if the fix doesnt apply to them, and takes up some significant time and effort.

Implementing "the alpine way" of building from sources using pkg-oss checkout for debian will help us to remove step 3/ from the process.

lucacome commented 1 month ago

Aren't the Raspberry Pis armv6?

thresheek commented 1 month ago

Oh, that's quite possible indeed.

yosifkit commented 1 month ago

Some of the Pi's are an arm32v6 chip, but Debian doesn't have an arm32v6 architecture. It is either armel (arm32v5) or armhf (arm32v7).

thresheek commented 1 month ago

I've implemented something in https://github.com/nginxinc/docker-nginx/pull/922 (that does not yet fix the arm32v5 builds, still needs to be fixed in pkg-oss).

thresheek commented 1 month ago

Fix for arm32v5 implemented in pkg-oss: https://hg.nginx.org/pkg-oss/rev/1b956b46f577

Will adapt after #922 is fixed & merged.