diff --git a/Dockerfile b/Dockerfile index 49183d5..d6c7958 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,34 @@ +FROM python:3.14.2-alpine3.23 AS wheelbuilder + +ENV PYALPM_VERSION 0.11.1 + +RUN apk --upgrade --no-cache add \ + build-base \ + pacman-dev \ + pkgconf \ + git \ + patchelf \ + && pip install --no-cache-dir \ + meson-python \ + pytest \ + auditwheel \ + ninja \ + && git clone --depth 1 --branch ${PYALPM_VERSION} https://gitlab.archlinux.org/archlinux/pyalpm.git \ + && pip wheel -w /wheelhouse --no-deps --no-build-isolation /pyalpm \ + && auditwheel repair -w /wheelhouse/ /wheelhouse/pyalpm-${PYALPM_VERSION}-cp314-cp314-linux_x86_64.whl --strip \ + && auditwheel show /wheelhouse/pyalpm-${PYALPM_VERSION}-cp314-cp314-musllinux_1_2_x86_64.whl + FROM python:3.14.2-alpine3.23 ENV TORNADO_VERSION 6.5.4 ENV PYCURL_VERSION 7.45.7 ENV NVCHECKER_VERSION 2.20 ENV PACKAGING_VERSION 26.0 +ENV AWESOMEVERSION_VERSION 25.8.0 +ENV PYALPM_VERSION 0.11.1 COPY docker-entrypoint.sh / +COPY --from=wheelbuilder /wheelhouse/pyalpm-${PYALPM_VERSION}-cp314-cp314-musllinux_1_2_x86_64.whl /tmp/ RUN apk --upgrade --no-cache add \ bash \ @@ -17,7 +40,11 @@ RUN apk --upgrade --no-cache add \ pycurl==${PYCURL_VERSION} \ nvchecker==${NVCHECKER_VERSION} \ packaging==${PACKAGING_VERSION} \ + awesomeversion==${AWESOMEVERSION_VERSION} \ + /tmp/pyalpm-${PYALPM_VERSION}-cp314-cp314-musllinux_1_2_x86_64.whl \ && apk del build.deps \ + && pip cache purge \ + && rm -f /tmp/pyalpm-${PYALPM_VERSION}-cp314-cp314-musllinux_1_2_x86_64.whl \ && chmod +x /docker-entrypoint.sh \ && nvchecker --help diff --git a/README.md b/README.md index d88d702..31ade0f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # nvchecker -* * ![Build Status](https://github.com/snw35/nvchecker/actions/workflows/update.yml/badge.svg) +- ![Build Status](https://github.com/snw35/nvchecker/actions/workflows/update.yml/badge.svg) - [Dockerhub: snw35/nvchecker](https://hub.docker.com/r/snw35/nvchecker) Dockerfile for the excellent [nvchecker](https://github.com/lilydjwg/nvchecker) Python module. @@ -13,18 +13,10 @@ This container is compliant with the official image specification and runs nvche `docker run -it --rm --mount type=bind,source=${PWD},target=/data/ -w /data snw35/nvchecker:latest nvchecker -c nvchecker.toml` -Where `nvchecker.toml` is the name of the nvchecker configuration file. +Where `nvchecker.toml` is the name of the nvchecker configuration file. The nvchecker documentation at https://nvchecker.readthedocs.io shows how to write an nvchecker.toml file for your application. ## Automating Container Updates I use this as part of a workflow to automatically update my container images. It runs in tandem with [dfupdate](https://github.com/snw35/dfupdate) (Dockerfile Updater) to automatically detect when new versions of software packaged in a Dockerfile are available, and to write and commit the changes directly, triggering a new build and container push to Dockerhub. The base image is also updated automatically. So yes, this nvchecker image updates itself :) - -## Releases - -Releases are tagged with all version numbers of software installed in the Dockerfile followed by the version of the base image: - -- version1-version2-version3-...-base-image-version - -Container images are tagged with the primary software version. The `lastest` tag always points to the last image built, which is **NOT** guaranteed to be the latest release, but in most cases should be. diff --git a/new_ver.json b/new_ver.json index 1b3a460..e6ecf3c 100644 --- a/new_ver.json +++ b/new_ver.json @@ -1,6 +1,10 @@ { "version": 2, "data": { + "AWESOMEVERSION": { + "version": "25.8.0", + "url": "https://pypi.org/project/awesomeversion/25.8.0/" + }, "BASE": { "version": "3.14.2-alpine3.23" }, @@ -12,6 +16,11 @@ "version": "26.0", "url": "https://pypi.org/project/packaging/26.0/" }, + "PYALPM": { + "version": "0.11.1", + "revision": "2c7917acd103fcc7916c9d46a68b6579adf21105", + "url": "https://gitlab.archlinux.org/archlinux/pyalpm/-/tags/0.11.1" + }, "PYCURL": { "version": "7.45.7", "url": "https://pypi.org/project/pycurl/7.45.7/" diff --git a/nvchecker.toml b/nvchecker.toml index 6e3da4b..47b147f 100644 --- a/nvchecker.toml +++ b/nvchecker.toml @@ -2,6 +2,11 @@ oldver = "old_ver.json" newver = "new_ver.json" +[BASE_WHEELBUILDER] +source = "container" +container = "library/python" +include_regex = "\\d+\\.\\d+\\.?\\d?-alpine\\d\\.\\d+" + [BASE] source = "container" container = "library/python" @@ -22,3 +27,13 @@ pypi = "nvchecker" [PACKAGING] source = "pypi" pypi = "packaging" + +[PYALPM] +source = "gitlab" +gitlab = "archlinux/pyalpm" +host = "gitlab.archlinux.org" +use_max_tag = "true" + +[AWESOMEVERSION] +source = "pypi" +pypi = "awesomeversion"