nginxinc / docker-nginx

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

Add riscv64 support #898

Open mengzhuo opened 5 months ago

mengzhuo commented 5 months ago

Proposed changes

Since riscv64 had be adopted in alpine 3.20 (stable, released in May 22), we can add riscv64 and update alpine.

Checklist

Before creating a PR, run through this checklist and mark each as complete:

mmoll commented 3 months ago

@mengzhuo after the latest merges, only the riscv64 addition should remain after a rebase

mengzhuo commented 3 months ago

@mmoll Thanks for your kind reminder, done.

thresheek commented 3 months ago

Thanks, I plan to add it soon. Can you confirm those dockerfiles compile fine on riscv64 hardware? I don't have access to it.

mengzhuo commented 3 months ago

@thresheek Sure! Here is logs

root@visionfive2-2:~/docker-nginx/stable/alpine-slim# uname -a
Linux visionfive2-2 6.8.0-40-generic #40.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 31 06:23:15 UTC 2024 riscv64 riscv64 riscv64 GNU/Linux
root@visionfive2-2:~/docker-nginx/stable/alpine-slim# podman build -t nginx:alpine-slim .
...build log truncated...
root@visionfive2-2:~/docker-nginx/stable/alpine-slim# podman image inspect nginx:alpine-slim | grep Architecture
          "Architecture": "riscv64",
root@visionfive2-2:~/docker-nginx/stable/alpine-slim# podman run -d -p 80:80 --rm nginx:alpine-slim

curl localhost works fine.