Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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

Expand Down
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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.
9 changes: 9 additions & 0 deletions new_ver.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand All @@ -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/"
Expand Down
15 changes: 15 additions & 0 deletions nvchecker.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"