1- # Python image for AMP containers including Python 3.10, 3.11 (default) and 3.12 from upstream
1+ # Python image for AMP containers including Python 3.10, 3.11 (default), 3.12 and 3.13 from upstream
22# ghcr.io/cubecoders/amp:python-3
33
44FROM python:3.10-slim-bookworm AS py310
@@ -37,14 +37,26 @@ RUN chmod +x /usr/local/bin/find-deps.sh
3737RUN set -eux; \
3838 /usr/local/bin/find-deps.sh ${PYTHON_VERSION} >/tmp/${PYTHON_VERSION}-run-deps.txt
3939
40+ FROM python:3.13-slim-bookworm AS py313
41+
42+ ENV DEBIAN_FRONTEND="noninteractive"
43+
44+ ARG PYTHON_VERSION="3.13"
45+
46+ COPY scripts/python/find-deps.sh /usr/local/bin/find-deps.sh
47+ RUN chmod +x /usr/local/bin/find-deps.sh
48+
49+ RUN set -eux; \
50+ /usr/local/bin/find-deps.sh ${PYTHON_VERSION} >/tmp/${PYTHON_VERSION}-run-deps.txt
51+
4052FROM ghcr.io/cubecoders/amp:debian
4153LABEL org.opencontainers.image.licenses=MIT
4254
4355ENV PIP_DISABLE_PIP_VERSION_CHECK="1"
4456ENV DEBIAN_FRONTEND="noninteractive"
4557
4658ARG PYTHON_DEFAULT="3.11"
47- ARG PYTHON_NON_DEFAULT="3.10 3.12"
59+ ARG PYTHON_NON_DEFAULT="3.10 3.12 3.13 "
4860
4961# Drop in upstream Python 3.10
5062COPY --from=py310 /usr/local/ /usr/local/
@@ -56,6 +68,11 @@ COPY --from=py312 /usr/local/ /usr/local/
5668
5769COPY --from=py312 /tmp/3.12-run-deps.txt /tmp/3.12-run-deps.txt
5870
71+ # Drop in upstream Python 3.13
72+ COPY --from=py313 /usr/local/ /usr/local/
73+
74+ COPY --from=py313 /tmp/3.13-run-deps.txt /tmp/3.13-run-deps.txt
75+
5976# Drop in upstream Python 3.11 (default last)
6077COPY --from=py311 /usr/local/ /usr/local/
6178
0 commit comments