diff --git a/python/3.12/jammy/Containerfile b/python/3.12/jammy/Containerfile index fd975f1..c7f2e7b 100644 --- a/python/3.12/jammy/Containerfile +++ b/python/3.12/jammy/Containerfile @@ -1,12 +1,14 @@ # syntax=docker/dockerfile:1 ARG BASE_IMAGE=docker.io/boxcutter/buildpack-deps:jammy +# hadolint ignore=DL3006 FROM $BASE_IMAGE # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH -# http://bugs.python.org/issue19846 -# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. +# cannot remove LANG even though https://bugs.python.org/issue19846 is fixed +# last attempted removal of LANG broke many users: +# https://github.com/docker-library/python/pull/570 ENV LANG C.UTF-8 # runtime dependencies @@ -20,7 +22,7 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/* ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.12.5 +ENV PYTHON_VERSION 3.12.6 # hadolint ignore=DL3003,DL3047 RUN set -eux; \ @@ -46,7 +48,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -85,42 +87,18 @@ RUN set -eux; \ \ ldconfig; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.2 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -# hadolint ignore=DL3047 -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - --no-setuptools \ - --no-wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - -CMD ["python3"] +CMD ["python3"] \ No newline at end of file diff --git a/python/3.12/jammy/docker-bake.hcl b/python/3.12/jammy/docker-bake.hcl index 775a0ea..26906c2 100644 --- a/python/3.12/jammy/docker-bake.hcl +++ b/python/3.12/jammy/docker-bake.hcl @@ -3,7 +3,7 @@ variable "TAG_PREFIX" { } variable "VERSION" { - default = "3.12.5" + default = "3.12.6" } # There's no darwin-based Docker, so if we're running on macOS, change the platform to linux diff --git a/python/3.12/noble/Containerfile b/python/3.12/noble/Containerfile index f4b7b03..86668ba 100644 --- a/python/3.12/noble/Containerfile +++ b/python/3.12/noble/Containerfile @@ -1,12 +1,14 @@ # syntax=docker/dockerfile:1 ARG BASE_IMAGE=docker.io/boxcutter/buildpack-deps:noble +# hadolint ignore=DL3006 FROM $BASE_IMAGE # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH -# http://bugs.python.org/issue19846 -# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. +# cannot remove LANG even though https://bugs.python.org/issue19846 is fixed +# last attempted removal of LANG broke many users: +# https://github.com/docker-library/python/pull/570 ENV LANG C.UTF-8 # runtime dependencies @@ -20,7 +22,7 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/* ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.12.5 +ENV PYTHON_VERSION 3.12.6 # hadolint ignore=DL3003,DL3047 RUN set -eux; \ @@ -46,7 +48,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -85,42 +87,18 @@ RUN set -eux; \ \ ldconfig; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.2 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -# hadolint ignore=DL3047 -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - --no-setuptools \ - --no-wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - -CMD ["python3"] +CMD ["python3"] \ No newline at end of file diff --git a/python/3.12/noble/docker-bake.hcl b/python/3.12/noble/docker-bake.hcl index b6f7c22..c8555c9 100644 --- a/python/3.12/noble/docker-bake.hcl +++ b/python/3.12/noble/docker-bake.hcl @@ -3,7 +3,7 @@ variable "TAG_PREFIX" { } variable "VERSION" { - default = "3.12.5" + default = "3.12.6" } # There's no darwin-based Docker, so if we're running on macOS, change the platform to linux diff --git a/python/3.12/slim-jammy/Containerfile b/python/3.12/slim-jammy/Containerfile index 602a1d9..3e3a124 100644 --- a/python/3.12/slim-jammy/Containerfile +++ b/python/3.12/slim-jammy/Containerfile @@ -1,12 +1,14 @@ # syntax=docker/dockerfile:1 -ARG BASE_IMAGE=docker.io/ubuntu:jammy-20240808 +ARG BASE_IMAGE=docker.io/ubuntu:jammy-20240911.1 +# hadolint ignore=DL3006 FROM $BASE_IMAGE # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH -# http://bugs.python.org/issue19846 -# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. +# cannot remove LANG even though https://bugs.python.org/issue19846 is fixed +# last attempted removal of LANG broke many users: +# https://github.com/docker-library/python/pull/570 ENV LANG C.UTF-8 # runtime dependencies @@ -20,7 +22,7 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/* ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.12.5 +ENV PYTHON_VERSION 3.12.6 SHELL ["/bin/bash", "-o", "pipefail", "-c"] # hadolint ignore=DL3003,DL3047,SC2086 @@ -73,7 +75,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -120,52 +122,18 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ rm -rf /var/lib/apt/lists/*; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.2 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# hadolint ignore=DL3047,SC2086 -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends wget; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - --no-setuptools \ - --no-wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - -CMD ["python3"] +CMD ["python3"] \ No newline at end of file diff --git a/python/3.12/slim-jammy/docker-bake.hcl b/python/3.12/slim-jammy/docker-bake.hcl index 13a9ba7..a16eaa6 100644 --- a/python/3.12/slim-jammy/docker-bake.hcl +++ b/python/3.12/slim-jammy/docker-bake.hcl @@ -3,7 +3,7 @@ variable "TAG_PREFIX" { } variable "VERSION" { - default = "3.12.5" + default = "3.12.6" } # There's no darwin-based Docker, so if we're running on macOS, change the platform to linux diff --git a/python/3.12/slim-noble/Containerfile b/python/3.12/slim-noble/Containerfile index 5beac78..66d1470 100644 --- a/python/3.12/slim-noble/Containerfile +++ b/python/3.12/slim-noble/Containerfile @@ -1,12 +1,13 @@ # syntax=docker/dockerfile:1 ARG CONTAINER_REGISTRY=docker.io -FROM $CONTAINER_REGISTRY/ubuntu:noble-20240605 +FROM $CONTAINER_REGISTRY/ubuntu:noble-20240827.1 # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH -# http://bugs.python.org/issue19846 -# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. +# cannot remove LANG even though https://bugs.python.org/issue19846 is fixed +# last attempted removal of LANG broke many users: +# https://github.com/docker-library/python/pull/570 ENV LANG C.UTF-8 # runtime dependencies @@ -20,7 +21,7 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/* ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.12.4 +ENV PYTHON_VERSION 3.12.6 SHELL ["/bin/bash", "-o", "pipefail", "-c"] # hadolint ignore=DL3003,DL3047,SC2086 @@ -73,7 +74,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -120,50 +121,18 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ rm -rf /var/lib/apt/lists/*; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.0 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/e03e1607ad60522cf34a92e834138eb89f57667c/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 ee09098395e42eb1f82ef4acb231a767a6ae85504a9cf9983223df0a7cbd35d7 - -SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# hadolint ignore=DL3047,SC2086 -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends wget; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - -CMD ["python3"] +CMD ["python3"] \ No newline at end of file diff --git a/python/3.12/slim-noble/docker-bake.hcl b/python/3.12/slim-noble/docker-bake.hcl index 1e6d136..f5db18e 100644 --- a/python/3.12/slim-noble/docker-bake.hcl +++ b/python/3.12/slim-noble/docker-bake.hcl @@ -3,7 +3,7 @@ variable "IMAGE_NAME" { } variable "VERSION" { - default = "3.12.4" + default = "3.12.6" } variable "CONTAINER_REGISTRY" {