Upgrade Docker base image to Python 3.12

python:3.8-slim is EOL (security support ended Oct 2024). Move to
python:3.12-slim and drop the pinned setuptools==59.5.0, which
predates 3.12 support; use the current setuptools instead.
This commit is contained in:
Father Bot
2026-01-24 11:20:14 +03:00
parent 8624e97dd2
commit 9bd3f60d59
+2 -2
View File
@@ -1,4 +1,4 @@
FROM python:3.8-slim FROM python:3.12-slim
# flush stdout/stderr immediately so logs show up in `docker logs` # flush stdout/stderr immediately so logs show up in `docker logs`
ENV PYTHONUNBUFFERED=1 ENV PYTHONUNBUFFERED=1
@@ -15,7 +15,7 @@ RUN \
; \ ; \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
RUN pip3 install --no-cache-dir -U pip && pip3 install --no-cache-dir -U wheel && pip3 install --no-cache-dir -U setuptools==59.5.0 RUN pip3 install --no-cache-dir -U pip && pip3 install --no-cache-dir -U wheel && pip3 install --no-cache-dir -U setuptools
COPY ./requirements.txt /tmp/requirements.txt COPY ./requirements.txt /tmp/requirements.txt
RUN pip3 install --no-cache-dir -r /tmp/requirements.txt && rm -r /tmp/requirements.txt RUN pip3 install --no-cache-dir -r /tmp/requirements.txt && rm -r /tmp/requirements.txt