From 971c2408ff6fb9ed07ad8d60f69378abf7bc96f3 Mon Sep 17 00:00:00 2001 From: Joseph Ross Date: Wed, 16 Sep 2026 17:45:56 -0700 Subject: [PATCH] Build on imgproxy-base v4.1.5 and a bookworm runtime Debian 11 bullseye can no longer be built against: its package pool has been pruned while the suite index still advertises the removed versions, so apt resolves a version and then 404s on the download. Both stages were affected, the build stage through imgproxy-base v3.14.0 and the final image directly. The whole 3.x line of imgproxy-base is bullseye, so there is no smaller bump that escapes it. v4.1.5 is built on Ubuntu 22.04, which carries support years further out than a Debian oldstable would. The final image keeps Python 3.11 for the dither plugin's compiled extension but moves to bookworm, which also brings the distro python3 to 3.11; on bullseye it was 3.9, a version apart from the interpreter the plugin installs against. Its newer setuptools shadows the stdlib distutils with a vendored copy that dropped msvccompiler, which numpy.distutils needs to build the Fortran extension, so that install asks for the stdlib one. Dither output is unchanged: the same palette and image render pixel-identically to the previous stack, for both the drive-value output and the soft proof. Assisted by Claude Opus 5 --- docker/Dockerfile | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 9ac0afebbb..35b62cdeb3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -ARG BASE_IMAGE_VERSION="v3.14.0" +ARG BASE_IMAGE_VERSION="v4.1.5" FROM ghcr.io/imgproxy/imgproxy-base:${BASE_IMAGE_VERSION} AS build @@ -43,8 +43,11 @@ RUN git clone --depth 1 --branch v1.21.2 https://github.com/strukturag/libheif.g # ================================================================================================== # Final image -# should match imgproxy-base image base w/ proper python version -FROM python:3.11-slim-bullseye +# Python 3.11 to match the compiled extension the dither plugin ships. This is no +# longer the same distro as imgproxy-base, which moved to Ubuntu; the binary built +# there runs here anyway. Bullseye is not an option: its package pool has been +# pruned, so apt can resolve versions it can no longer download. +FROM python:3.11-slim-bookworm LABEL maintainer="Sergey Alexandrovich " RUN apt-get update \ @@ -86,8 +89,12 @@ RUN pip3 install git+https://github.com/pushd/pyamg.git@v5.2.0_with_pinned_scm - COPY plugins/pushd-dither /opt/pushd-dither/ +# numpy.distutils needs the stdlib distutils, which setuptools otherwise shadows +# with a vendored copy that dropped msvccompiler. Only works while the plugin is on +# Python 3.11; 3.12 removed stdlib distutils, so setup.py has to move off +# numpy.distutils before then. RUN cd /opt/pushd-dither \ - && python3 -m pip install -e . --break-system-packages --target=/usr/local/lib/python3.11/ + && SETUPTOOLS_USE_DISTUTILS=stdlib python3 -m pip install -e . --break-system-packages --target=/usr/local/lib/python3.11/ # decompress LUTs RUN cd /opt/pushd-dither/lut_dither \