From 6ff06c2e922add44526f3f464af6f3e5c7a65ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannik=20R=C3=B6del?= Date: Wed, 29 Oct 2025 03:41:20 +0100 Subject: [PATCH] Rework container build to use upstream Alpine image instead of Python --- Dockerfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7fd6977..c7b5c08 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,12 +25,15 @@ RUN SITE=${SITE} npm run build:site # # Actual server container # -FROM docker.io/python:3.14-alpine +FROM docker.io/library/alpine:latest ARG SITE +RUN apk add --no-cache lighttpd && \ + apk add --no-cache python3 py3-requests py3-itsdangerous py3-magic RUN --mount=type=cache,target=/root/.cache/pip \ - apk add --no-cache lighttpd && \ - python -m pip install legacy-cgi itsdangerous requests python-libmagic + apk add --no-cache py3-pip && \ + python3 -m pip install legacy-cgi --break-system-packages && \ + apk del py3-pip COPY --from=build /build/dist /www/ COPY cgi-bin /cgi-bin/ @@ -38,7 +41,7 @@ COPY sites/${SITE}/httpd.conf /httpd.conf COPY sites/${SITE}/_data/config.json /config.json RUN sed -i \ - -e "s,@python@,/usr/local/bin/python,g" \ + -e "s,@python@,/usr/bin/python3,g" \ -e "s,@site@,/www,g" \ -e "s,@cgibin@,/cgi-bin,g" \ /httpd.conf @@ -50,7 +53,7 @@ ENV ZAMMAD_URL=https://ticket.z31.it ENV ZAMMAD_GROUP="" HEALTHCHECK --interval=30s --timeout=10s --retries=3 \ - CMD wget --no-verbose --tries=1 --spider http://127.0.0.1/ || exit 1 + CMD curl -sSf http://127.0.0.1/ > /dev/null || exit 1 # Reroute stdout to a new file descriptor so that Lighttpd can use it as the # access log. See http.conf and here: