docker-nginx icon indicating copy to clipboard operation
docker-nginx copied to clipboard

Update mainline to Alpine 3.20

Open jnoordsij opened this issue 1 year ago • 4 comments

Proposed changes

Updates the mainline image to use Alpine 3.20 as default version. See also https://alpinelinux.org/posts/Alpine-3.20.0-released.html.

Note: given that this requires built binaries for the new Alpine version and won't take any effect until an actual new release of nginx itself, this PR is intentionally marked as draft, so it can function both as a heads-up about the new release (in anticipation of new mainline release that will probably appear soon?) and a place that allows for subscription to any potential updates. It can then be merged later at any convenient time when everything is ready. However, if it is still preferable to close this in the meantime, feel free to do so.

Checklist

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

  • [x] I have read the CONTRIBUTING document
  • [x] I have run ./update.sh and ensured all entrypoint/Dockerfile template changes have been applied to the relevant image entrypoint scripts & Dockerfiles
  • [ ] If applicable, I have added tests that prove my fix is effective or that my feature works
  • [ ] If applicable, I have checked that any relevant tests pass after adding my changes
  • [ ] I have updated any relevant documentation

jnoordsij avatar May 22 '24 12:05 jnoordsij

Should be ready for 1.27.0 release once the Alpine binaries are available!

jnoordsij avatar May 29 '24 15:05 jnoordsij

AFAICT what's missing are Alpine 3.20 builds in the apk repo for x86 and aarch64 and for a build from source to succeed something like (or better than) this:

diff --git a/mainline/alpine-slim/Dockerfile b/mainline/alpine-slim/Dockerfile
index 370879b..302670f 100644
--- a/mainline/alpine-slim/Dockerfile
+++ b/mainline/alpine-slim/Dockerfile
@@ -53,6 +53,7 @@ RUN set -x \
                 bash \
                 alpine-sdk \
                 findutils \
+                curl \
             && su nobody -s /bin/sh -c " \
                 export HOME=${tempDir} \
                 && cd ${tempDir} \
@@ -68,7 +69,7 @@ RUN set -x \
                 && cd pkg-oss-${NGINX_VERSION}-${PKG_RELEASE} \
                 && cd alpine \
                 && make base \
-                && apk index -o ${tempDir}/packages/alpine/${apkArch}/APKINDEX.tar.gz ${tempDir}/packages/alpine/${apkArch}/*.apk \
+                && apk index --allow-untrusted -o ${tempDir}/packages/alpine/${apkArch}/APKINDEX.tar.gz ${tempDir}/packages/alpine/${apkArch}/*.apk \
                 && abuild-sign -k ${tempDir}/.abuild/abuild-key.rsa ${tempDir}/packages/alpine/${apkArch}/APKINDEX.tar.gz \
                 " \
             && cp ${tempDir}/.abuild/abuild-key.rsa.pub /etc/apk/keys/ \

mmoll avatar May 30 '24 18:05 mmoll

We are working on providing alpine-3.20 builds on nginx.org, no other changes will be necessary.

thresheek avatar May 30 '24 19:05 thresheek

@thresheek is there any open ticket to track this work? Keen to get this updated!

sciku1 avatar Jun 06 '24 01:06 sciku1

@thresheek do you intend to include this (and #895) with the next tagged releases that just popped up?

I noticed the built packages are there now, but when trying to update the version tags myself to get the builds working, I run into what seems to me as an inconsistency with package patchlevel versions (e.g. https://nginx.org/packages//mainline/alpine/v3.20/main/x86_64/nginx-1.27.1-r1.apk vs https://nginx.org/packages//mainline/alpine/v3.20/main/x86_64/nginx-module-geoip-1.27.1-r2.apk), so I couldn't include the version bumps just yet.

jnoordsij avatar Aug 14 '24 16:08 jnoordsij

Thanks @jnoordsij - it seems like the version unbump was forgotten for the built-in modules...

thresheek avatar Aug 14 '24 19:08 thresheek

I think I've got a fix; I intend to include a bump to 3.20 for both mainline and stable, once PR/jobs for version bump succeed.

thresheek avatar Aug 14 '24 20:08 thresheek

Hey @jnoordsij may I ask you to rebase against current again? thanks

Nevermind I think I can do it myself

thresheek avatar Aug 14 '24 21:08 thresheek

Merged, thank you!

thresheek avatar Aug 15 '24 00:08 thresheek