diff --git a/python/3.11/jammy/Containerfile b/python/3.11/jammy/Containerfile index ba458cd..ce45a0e 100644 --- a/python/3.11/jammy/Containerfile +++ b/python/3.11/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,9 +22,9 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/* ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.11.9 +ENV PYTHON_VERSION 3.11.10 -# hadolint ignore=DL3003,DL3047 +# hadolint ignore=DL3003,DL3013,DL3047 RUN set -eux; \ \ wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ @@ -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,45 +87,26 @@ RUN set -eux; \ \ ldconfig; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==65.5.1' \ + wheel \ + ; \ + 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/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 65.5.1 -# 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" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - -CMD ["python3"] +CMD ["python3"] \ No newline at end of file diff --git a/python/3.11/jammy/docker-bake.hcl b/python/3.11/jammy/docker-bake.hcl index 0ee4206..f1b66ee 100644 --- a/python/3.11/jammy/docker-bake.hcl +++ b/python/3.11/jammy/docker-bake.hcl @@ -3,7 +3,7 @@ variable "TAG_PREFIX" { } variable "VERSION" { - default = "3.11.9" + default = "3.11.10" } # There's no darwin-based Docker, so if we're running on macOS, change the platform to linux diff --git a/python/3.11/noble/Containerfile b/python/3.11/noble/Containerfile index 54f7d96..f2ce3ca 100644 --- a/python/3.11/noble/Containerfile +++ b/python/3.11/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,9 +22,9 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/* ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.11.9 +ENV PYTHON_VERSION 3.11.10 -# hadolint ignore=DL3003,DL3047 +# hadolint ignore=DL3003,DL3013,DL3047 RUN set -eux; \ \ wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ @@ -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,43 +87,26 @@ RUN set -eux; \ \ ldconfig; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==65.5.1' \ + wheel \ + ; \ + 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/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 65.5.1 -# 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 - -# 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" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - -CMD ["python3"] +CMD ["python3"] \ No newline at end of file diff --git a/python/3.11/noble/docker-bake.hcl b/python/3.11/noble/docker-bake.hcl index ad5cd5e..f917028 100644 --- a/python/3.11/noble/docker-bake.hcl +++ b/python/3.11/noble/docker-bake.hcl @@ -3,7 +3,7 @@ variable "TAG_PREFIX" { } variable "VERSION" { - default = "3.11.9" + default = "3.11.10" } # There's no darwin-based Docker, so if we're running on macOS, change the platform to linux diff --git a/python/3.11/slim-jammy/Containerfile b/python/3.11/slim-jammy/Containerfile index 4802661..dce3566 100644 --- a/python/3.11/slim-jammy/Containerfile +++ b/python/3.11/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,10 +22,10 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/* ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.11.9 +ENV PYTHON_VERSION 3.11.10 SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# hadolint ignore=DL3003,DL3047,SC2086 +# hadolint ignore=DL3003,DL3013,DL3047,SC2086 RUN set -eux; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -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,56 +122,26 @@ 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 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==65.5.1' \ + wheel \ + ; \ + 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/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 65.5.1 -# 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" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - - ; \ - rm -f get-pip.py; \ - \ - pip --version - -CMD ["python3"] +CMD ["python3"] \ No newline at end of file diff --git a/python/3.11/slim-jammy/docker-bake.hcl b/python/3.11/slim-jammy/docker-bake.hcl index d15c50c..ff13918 100644 --- a/python/3.11/slim-jammy/docker-bake.hcl +++ b/python/3.11/slim-jammy/docker-bake.hcl @@ -3,7 +3,7 @@ variable "TAG_PREFIX" { } variable "VERSION" { - default = "3.11.9" + default = "3.11.10" } # There's no darwin-based Docker, so if we're running on macOS, change the platform to linux diff --git a/python/3.11/slim-noble/Containerfile b/python/3.11/slim-noble/Containerfile index 6ae7d5b..ead1f16 100644 --- a/python/3.11/slim-noble/Containerfile +++ b/python/3.11/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,10 +21,10 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/* ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.11.9 +ENV PYTHON_VERSION 3.11.10 SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# hadolint ignore=DL3003,DL3047,SC2086 +# hadolint ignore=DL3003,DL3013,DL3047,SC2086 RUN set -eux; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -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,53 +121,26 @@ 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 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==65.5.1' \ + wheel \ + ; \ + 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/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 65.5.1 -# 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" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - -CMD ["python3"] +CMD ["python3"] \ No newline at end of file diff --git a/python/3.11/slim-noble/docker-bake.hcl b/python/3.11/slim-noble/docker-bake.hcl index d7feae8..61fd5a1 100644 --- a/python/3.11/slim-noble/docker-bake.hcl +++ b/python/3.11/slim-noble/docker-bake.hcl @@ -3,7 +3,7 @@ variable "IMAGE_NAME" { } variable "VERSION" { - default = "3.11.9" + default = "3.11.10" } variable "CONTAINER_REGISTRY" {