diff --git a/.jenkins b/.jenkins new file mode 100644 index 000000000..e7c74fc4b --- /dev/null +++ b/.jenkins @@ -0,0 +1,270 @@ +def versions = ["3.11", "3.10", "3.9", "3.8", "3.7"] + +def generatePublishStage(job) { + return { + stage("Publish py:${job}") { + withDockerRegistry(registry: [credentialsId: 'vio-docker-hub']) { + sh "docker push ${imageName}:${job}-${buildArch}" + sh "docker push ${imageName}:${job}-slim-${buildArch}" + } + } + } +} + +def generateManifestStage(job) { + return { + stage("Publish manifest py:${job}") { + withDockerRegistry(registry: [credentialsId: 'vio-docker-hub']) { + sh "docker manifest create --amend ${imageName}:${job} ${imageName}:${job}-amd64" // ${imageName}:${job}-arm64" + sh "docker manifest push --purge ${imageName}:${job}" + + sh "docker manifest create --amend ${imageName}:${job}-slim ${imageName}:${job}-slim-amd64" // ${imageName}:${job}-slim-arm64" + sh "docker manifest push --purge ${imageName}:${job}-slim" + } + } + } +} + +def publishStagesMap = versions.collectEntries { + ["${it}" : generatePublishStage(it)] +} + +def publishManifestsMap = versions.collectEntries { + ["${it}" : generateManifestStage(it)] +} + +pipeline { + + agent any + + environment { + imageName = 'vaporio/python' + } + + triggers { + upstream(upstreamProjects: 'vapor-ware/buildpack-deps/master', threshold: hudson.model.Result.SUCCESS) + } + + stages { + + stage('Sync') { + steps { + sh './update.sh' + } + } + + stage('Pull Base Images') { + // To ensure the build nodes have the latest correct arch builds of the + // base images, explicitly pull them here. + parallel { + stage('amd64') { + steps { + sh "docker pull vaporio/buildpack-deps:bionic" + } + } + + // stage('arm64') { + // agent { + // label 'arm64' + // } + // steps { + // sh "docker pull vaporio/buildpack-deps:bionic" + // } + // } + } + } + + stage('py37') { + environment { + pyVersion = "3.7" + } + parallel { + stage('amd64') { + environment { + buildArch = "amd64" + } + steps { + sh "docker build -t ${imageName}:${pyVersion}-${buildArch} ${pyVersion}/bionic" + sh "docker build -t ${imageName}:${pyVersion}-slim-${buildArch} ${pyVersion}/bionic/lite" + } + } + + // stage('arm64') { + // agent { + // label 'arm64' + // } + // environment { + // buildArch = "arm64" + // } + // steps { + // sh "docker build -t ${imageName}:${pyVersion}-${buildArch} ${pyVersion}/bionic" + // sh "docker build -t ${imageName}:${pyVersion}-slim-${buildArch} ${pyVersion}/bionic/lite" + // } + // } + } + } + + stage('py38') { + environment { + pyVersion = "3.8" + } + parallel { + stage('amd64') { + environment { + buildArch = "amd64" + } + steps { + sh "docker build -t ${imageName}:${pyVersion}-${buildArch} ${pyVersion}/bionic" + sh "docker build -t ${imageName}:${pyVersion}-slim-${buildArch} ${pyVersion}/bionic/lite" + } + } + + // stage('arm64') { + // agent { + // label 'arm64' + // } + // environment { + // buildArch = "arm64" + // } + // steps { + // sh "docker build -t ${imageName}:${pyVersion}-${buildArch} ${pyVersion}/bionic" + // sh "docker build -t ${imageName}:${pyVersion}-slim-${buildArch} ${pyVersion}/bionic/lite" + // } + // } + } + } + + stage('py39') { + environment { + pyVersion = "3.9" + } + parallel { + stage('amd64') { + environment { + buildArch = "amd64" + } + steps { + sh "docker build -t ${imageName}:${pyVersion}-${buildArch} ${pyVersion}/bionic" + sh "docker build -t ${imageName}:${pyVersion}-slim-${buildArch} ${pyVersion}/bionic/lite" + } + } + + // stage('arm64') { + // agent { + // label 'arm64' + // } + // environment { + // buildArch = "arm64" + // } + // steps { + // sh "docker build -t ${imageName}:${pyVersion}-${buildArch} ${pyVersion}/bionic" + // sh "docker build -t ${imageName}:${pyVersion}-slim-${buildArch} ${pyVersion}/bionic/lite" + // } + // } + } + } + + stage('py10') { + environment { + pyVersion = "3.10" + } + parallel { + stage('amd64') { + environment { + buildArch = "amd64" + } + steps { + sh "docker build -t ${imageName}:${pyVersion}-${buildArch} ${pyVersion}/bionic" + sh "docker build -t ${imageName}:${pyVersion}-slim-${buildArch} ${pyVersion}/bionic/lite" + } + } + + // stage('arm64') { + // agent { + // label 'arm64' + // } + // environment { + // buildArch = "arm64" + // } + // steps { + // sh "docker build -t ${imageName}:${pyVersion}-${buildArch} ${pyVersion}/bionic" + // sh "docker build -t ${imageName}:${pyVersion}-slim-${buildArch} ${pyVersion}/bionic/lite" + // } + // } + } + } + + stage('py11') { + environment { + pyVersion = "3.11" + } + parallel { + stage('amd64') { + environment { + buildArch = "amd64" + } + steps { + sh "docker build -t ${imageName}:${pyVersion}-${buildArch} ${pyVersion}/bionic" + sh "docker build -t ${imageName}:${pyVersion}-slim-${buildArch} ${pyVersion}/bionic/lite" + } + } + + // stage('arm64') { + // agent { + // label 'arm64' + // } + // environment { + // buildArch = "arm64" + // } + // steps { + // sh "docker build -t ${imageName}:${pyVersion}-${buildArch} ${pyVersion}/bionic" + // sh "docker build -t ${imageName}:${pyVersion}-slim-${buildArch} ${pyVersion}/bionic/lite" + // } + // } + } + } + + stage('Publish Images') { + when { + branch 'master' + } + parallel { + stage('amd64') { + environment { + buildArch = "amd64" + } + steps { + script { + parallel publishStagesMap + } + } + } + + // stage('arm64') { + // agent { + // label 'arm64' + // } + // environment { + // buildArch = "arm64" + // } + // steps { + // script { + // parallel publishStagesMap + // } + // } + // } + } + } + + stage ('Publish Manifests') { + when { + branch 'master' + } + steps { + script { + parallel publishManifestsMap + } + } + } + } +} diff --git a/3.10-rc/alpine3.12/Dockerfile b/3.10/alpine3.17/Dockerfile similarity index 91% rename from 3.10-rc/alpine3.12/Dockerfile rename to 3.10/alpine3.17/Dockerfile index cdf4676f6..21c5f9099 100644 --- a/3.10-rc/alpine3.12/Dockerfile +++ b/3.10/alpine3.17/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM alpine:3.12 +FROM alpine:3.17 # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -18,7 +18,7 @@ ENV LANG C.UTF-8 RUN apk add --no-cache ca-certificates ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.10.0a1 +ENV PYTHON_VERSION 3.10.9 RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ @@ -29,7 +29,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -108,10 +108,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN set -ex; \ \ diff --git a/3.10/bionic/Dockerfile b/3.10/bionic/Dockerfile new file mode 100644 index 000000000..f356b0f67 --- /dev/null +++ b/3.10/bionic/Dockerfile @@ -0,0 +1,106 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM vaporio/buildpack-deps:bionic + +# 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. +ENV LANG C.UTF-8 +ENV DEBIAN_FRONTEND noninteractive + +# extra dependencies (over what buildpack-deps already includes) +RUN apt-get update; \ + apt-get install -y --no-install-recommends \ + libbluetooth-dev \ + tk-dev \ + uuid-dev \ + && rm -rf /var/lib/apt/lists/* + +ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION 3.10.9 + +RUN set -ex \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && for server in $(shuf -e \ + ha.pool.sks-keyservers.net \ + hkp://p80.pool.sks-keyservers.net:80 \ + keyserver.ubuntu.com \ + hkp://keyserver.ubuntu.com:80 \ + pgp.mit.edu) ; do \ + gpg --batch --keyserver "$server" --recv-keys "$GPG_KEY" && break || : ; \ + done \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ + && rm -rf "$GNUPGHOME" python.tar.xz.asc \ + && mkdir -p /usr/src/python \ + && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ + && rm python.tar.xz \ + \ + && cd /usr/src/python \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ + && ./configure \ + --build="$gnuArch" \ + --enable-loadable-sqlite-extensions \ + --enable-optimizations \ + --enable-option-checking=fatal \ + --enable-shared \ + --with-system-expat \ + --with-system-ffi \ + --without-ensurepip \ + && make -j "$(nproc)" \ + && make install \ + && rm -rf /usr/src/python \ + \ + && find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ + -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \ + \) -exec rm -rf '{}' + \ + \ + && ldconfig \ + \ + && python3 --version + +# make some useful symlinks that are expected to exist +RUN cd /usr/local/bin \ + && ln -s idle3 idle \ + && ln -s pydoc3 pydoc \ + && ln -s python3 python \ + && ln -s python3-config python-config + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION 22.3.1 +# https://github.com/pypa/get-pip +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 + +RUN set -ex; \ + \ + wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ + echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \ + \ + python get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + "pip==$PYTHON_PIP_VERSION" \ + ; \ + pip --version; \ + \ + find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ + -o \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ + \) -exec rm -rf '{}' +; \ + rm -f get-pip.py + +CMD ["python3"] diff --git a/3.10/bionic/lite/Dockerfile b/3.10/bionic/lite/Dockerfile new file mode 100644 index 000000000..ae43f58c3 --- /dev/null +++ b/3.10/bionic/lite/Dockerfile @@ -0,0 +1,151 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM vaporio/foundation:bionic + +# 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. +ENV LANG C.UTF-8 +ENV DEBIAN_FRONTEND noninteractive + +# runtime dependencies +RUN apt-get update; \ + apt-get install -y --no-install-recommends \ + ca-certificates \ + netbase \ + && rm -rf /var/lib/apt/lists/* + +ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION 3.10.9 + +RUN set -ex \ + \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ + dpkg-dev \ + gcc \ + libbluetooth-dev \ + libbz2-dev \ + libc6-dev \ + libexpat1-dev \ + libffi-dev \ + libgdbm-dev \ + liblzma-dev \ + libncursesw5-dev \ + libreadline-dev \ + libsqlite3-dev \ + libssl-dev \ + make \ + tk-dev \ + uuid-dev \ + wget \ + xz-utils \ + zlib1g-dev \ +# as of Stretch, "gpg" is no longer included by default + $(command -v gpg > /dev/null || echo 'gnupg dirmngr') \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && for server in $(shuf -e \ + ha.pool.sks-keyservers.net \ + hkp://p80.pool.sks-keyservers.net:80 \ + keyserver.ubuntu.com \ + hkp://keyserver.ubuntu.com:80 \ + pgp.mit.edu) ; do \ + gpg --batch --keyserver "$server" --recv-keys "$GPG_KEY" && break || : ; \ + done \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ + && rm -rf "$GNUPGHOME" python.tar.xz.asc \ + && mkdir -p /usr/src/python \ + && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ + && rm python.tar.xz \ + \ + && cd /usr/src/python \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ + && ./configure \ + --build="$gnuArch" \ + --enable-loadable-sqlite-extensions \ + --enable-optimizations \ + --enable-option-checking=fatal \ + --enable-shared \ + --with-system-expat \ + --with-system-ffi \ + --without-ensurepip \ + && make -j "$(nproc)" \ + LDFLAGS="-Wl,--strip-all" \ + && make install \ + && rm -rf /usr/src/python \ + \ + && find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ + -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \ + \) -exec rm -rf '{}' + \ + \ + && ldconfig \ + \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ + | awk '/=>/ { print $(NF-1) }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -r apt-mark manual \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && rm -rf /var/lib/apt/lists/* \ + \ + && python3 --version + +# make some useful symlinks that are expected to exist +RUN cd /usr/local/bin \ + && ln -s idle3 idle \ + && ln -s pydoc3 pydoc \ + && ln -s python3 python \ + && ln -s python3-config python-config + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION 22.3.1 +# https://github.com/pypa/get-pip +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 + +RUN set -ex; \ + \ + 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 --check --strict -; \ + \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + rm -rf /var/lib/apt/lists/*; \ + \ + python get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + "pip==$PYTHON_PIP_VERSION" \ + ; \ + pip --version; \ + \ + find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ + -o \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ + \) -exec rm -rf '{}' +; \ + rm -f get-pip.py + +CMD ["python3"] diff --git a/3.10-rc/buster/Dockerfile b/3.10/buster/Dockerfile similarity index 88% rename from 3.10-rc/buster/Dockerfile rename to 3.10/buster/Dockerfile index 521b75c4d..b785f042c 100644 --- a/3.10-rc/buster/Dockerfile +++ b/3.10/buster/Dockerfile @@ -21,14 +21,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.10.0a1 +ENV PYTHON_VERSION 3.10.9 RUN set -ex \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -69,10 +69,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN set -ex; \ \ diff --git a/3.10-rc/buster/slim/Dockerfile b/3.10/buster/slim/Dockerfile similarity index 92% rename from 3.10-rc/buster/slim/Dockerfile rename to 3.10/buster/slim/Dockerfile index 3a02d3b83..5dbf09e97 100644 --- a/3.10-rc/buster/slim/Dockerfile +++ b/3.10/buster/slim/Dockerfile @@ -20,7 +20,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.10.0a1 +ENV PYTHON_VERSION 3.10.9 RUN set -ex \ \ @@ -51,7 +51,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -105,10 +105,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN set -ex; \ \ diff --git a/3.10-rc/windows/windowsservercore-1809/Dockerfile b/3.10/windows/windowsservercore-1809/Dockerfile similarity index 88% rename from 3.10-rc/windows/windowsservercore-1809/Dockerfile rename to 3.10/windows/windowsservercore-1809/Dockerfile index f5e7bca46..d0d0289a3 100644 --- a/3.10-rc/windows/windowsservercore-1809/Dockerfile +++ b/3.10/windows/windowsservercore-1809/Dockerfile @@ -8,8 +8,8 @@ FROM mcr.microsoft.com/windows/servercore:1809 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -ENV PYTHON_VERSION 3.10.0a1 -ENV PYTHON_RELEASE 3.10.0 +ENV PYTHON_VERSION 3.10.9 +ENV PYTHON_RELEASE 3.10.9 RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \ Write-Host ('Downloading {0} ...' -f $url); \ @@ -42,10 +42,10 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env Write-Host 'Complete.' # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ diff --git a/3.10-rc/windows/windowsservercore-ltsc2016/Dockerfile b/3.10/windows/windowsservercore-ltsc2016/Dockerfile similarity index 88% rename from 3.10-rc/windows/windowsservercore-ltsc2016/Dockerfile rename to 3.10/windows/windowsservercore-ltsc2016/Dockerfile index 49d5c175a..6880cfd8b 100644 --- a/3.10-rc/windows/windowsservercore-ltsc2016/Dockerfile +++ b/3.10/windows/windowsservercore-ltsc2016/Dockerfile @@ -8,8 +8,8 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2016 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -ENV PYTHON_VERSION 3.10.0a1 -ENV PYTHON_RELEASE 3.10.0 +ENV PYTHON_VERSION 3.10.9 +ENV PYTHON_RELEASE 3.10.9 RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \ Write-Host ('Downloading {0} ...' -f $url); \ @@ -42,10 +42,10 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env Write-Host 'Complete.' # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ diff --git a/3.8/alpine3.11/Dockerfile b/3.11/alpine3.17/Dockerfile similarity index 89% rename from 3.8/alpine3.11/Dockerfile rename to 3.11/alpine3.17/Dockerfile index 67ab7656f..1da6c5677 100644 --- a/3.8/alpine3.11/Dockerfile +++ b/3.11/alpine3.17/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM alpine:3.11 +FROM alpine:3.17 # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -17,8 +17,8 @@ ENV LANG C.UTF-8 # other runtime dependencies for Python are installed later RUN apk add --no-cache ca-certificates -ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.8.6 +ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION 3.11.1 RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ @@ -29,7 +29,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -89,7 +89,6 @@ RUN set -ex \ \( \ \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \ - -o \( -type f -a -name 'wininst-*.exe' \) \ \) -exec rm -rf '{}' + \ \ && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \ @@ -109,10 +108,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN set -ex; \ \ diff --git a/3.11/bionic/Dockerfile b/3.11/bionic/Dockerfile new file mode 100644 index 000000000..85b0f6a39 --- /dev/null +++ b/3.11/bionic/Dockerfile @@ -0,0 +1,106 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM vaporio/buildpack-deps:bionic + +# 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. +ENV LANG C.UTF-8 +ENV DEBIAN_FRONTEND noninteractive + +# extra dependencies (over what buildpack-deps already includes) +RUN apt-get update; \ + apt-get install -y --no-install-recommends \ + libbluetooth-dev \ + tk-dev \ + uuid-dev \ + && rm -rf /var/lib/apt/lists/* + +ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION 3.11.1 + +RUN set -ex \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && for server in $(shuf -e \ + ha.pool.sks-keyservers.net \ + hkp://p80.pool.sks-keyservers.net:80 \ + keyserver.ubuntu.com \ + hkp://keyserver.ubuntu.com:80 \ + pgp.mit.edu) ; do \ + gpg --batch --keyserver "$server" --recv-keys "$GPG_KEY" && break || : ; \ + done \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ + && rm -rf "$GNUPGHOME" python.tar.xz.asc \ + && mkdir -p /usr/src/python \ + && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ + && rm python.tar.xz \ + \ + && cd /usr/src/python \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ + && ./configure \ + --build="$gnuArch" \ + --enable-loadable-sqlite-extensions \ + --enable-optimizations \ + --enable-option-checking=fatal \ + --enable-shared \ + --with-system-expat \ + --with-system-ffi \ + --without-ensurepip \ + && make -j "$(nproc)" \ + && make install \ + && rm -rf /usr/src/python \ + \ + && find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ + -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \ + \) -exec rm -rf '{}' + \ + \ + && ldconfig \ + \ + && python3 --version + +# make some useful symlinks that are expected to exist +RUN cd /usr/local/bin \ + && ln -s idle3 idle \ + && ln -s pydoc3 pydoc \ + && ln -s python3 python \ + && ln -s python3-config python-config + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION 22.3.1 +# https://github.com/pypa/get-pip +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 + +RUN set -ex; \ + \ + wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ + echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \ + \ + python get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + "pip==$PYTHON_PIP_VERSION" \ + ; \ + pip --version; \ + \ + find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ + -o \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ + \) -exec rm -rf '{}' +; \ + rm -f get-pip.py + +CMD ["python3"] diff --git a/3.11/bionic/lite/Dockerfile b/3.11/bionic/lite/Dockerfile new file mode 100644 index 000000000..685c479b1 --- /dev/null +++ b/3.11/bionic/lite/Dockerfile @@ -0,0 +1,151 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM vaporio/foundation:bionic + +# 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. +ENV LANG C.UTF-8 +ENV DEBIAN_FRONTEND noninteractive + +# runtime dependencies +RUN apt-get update; \ + apt-get install -y --no-install-recommends \ + ca-certificates \ + netbase \ + && rm -rf /var/lib/apt/lists/* + +ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION 3.11.1 + +RUN set -ex \ + \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ + dpkg-dev \ + gcc \ + libbluetooth-dev \ + libbz2-dev \ + libc6-dev \ + libexpat1-dev \ + libffi-dev \ + libgdbm-dev \ + liblzma-dev \ + libncursesw5-dev \ + libreadline-dev \ + libsqlite3-dev \ + libssl-dev \ + make \ + tk-dev \ + uuid-dev \ + wget \ + xz-utils \ + zlib1g-dev \ +# as of Stretch, "gpg" is no longer included by default + $(command -v gpg > /dev/null || echo 'gnupg dirmngr') \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && for server in $(shuf -e \ + ha.pool.sks-keyservers.net \ + hkp://p80.pool.sks-keyservers.net:80 \ + keyserver.ubuntu.com \ + hkp://keyserver.ubuntu.com:80 \ + pgp.mit.edu) ; do \ + gpg --batch --keyserver "$server" --recv-keys "$GPG_KEY" && break || : ; \ + done \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ + && rm -rf "$GNUPGHOME" python.tar.xz.asc \ + && mkdir -p /usr/src/python \ + && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ + && rm python.tar.xz \ + \ + && cd /usr/src/python \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ + && ./configure \ + --build="$gnuArch" \ + --enable-loadable-sqlite-extensions \ + --enable-optimizations \ + --enable-option-checking=fatal \ + --enable-shared \ + --with-system-expat \ + --with-system-ffi \ + --without-ensurepip \ + && make -j "$(nproc)" \ + LDFLAGS="-Wl,--strip-all" \ + && make install \ + && rm -rf /usr/src/python \ + \ + && find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ + -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \ + \) -exec rm -rf '{}' + \ + \ + && ldconfig \ + \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ + | awk '/=>/ { print $(NF-1) }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -r apt-mark manual \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && rm -rf /var/lib/apt/lists/* \ + \ + && python3 --version + +# make some useful symlinks that are expected to exist +RUN cd /usr/local/bin \ + && ln -s idle3 idle \ + && ln -s pydoc3 pydoc \ + && ln -s python3 python \ + && ln -s python3-config python-config + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION 22.3.1 +# https://github.com/pypa/get-pip +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 + +RUN set -ex; \ + \ + 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 --check --strict -; \ + \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + rm -rf /var/lib/apt/lists/*; \ + \ + python get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + "pip==$PYTHON_PIP_VERSION" \ + ; \ + pip --version; \ + \ + find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ + -o \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ + \) -exec rm -rf '{}' +; \ + rm -f get-pip.py + +CMD ["python3"] diff --git a/3.6/jessie/Dockerfile b/3.11/buster/Dockerfile similarity index 69% rename from 3.6/jessie/Dockerfile rename to 3.11/buster/Dockerfile index 1055f2fd5..3e604d788 100644 --- a/3.6/jessie/Dockerfile +++ b/3.11/buster/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM buildpack-deps:jessie +FROM buildpack-deps:buster # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -15,18 +15,20 @@ ENV LANG C.UTF-8 # extra dependencies (over what buildpack-deps already includes) RUN apt-get update && apt-get install -y --no-install-recommends \ + libbluetooth-dev \ tk-dev \ + uuid-dev \ && rm -rf /var/lib/apt/lists/* -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.9 +ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION 3.11.1 RUN set -ex \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -40,57 +42,22 @@ RUN set -ex \ --build="$gnuArch" \ --enable-loadable-sqlite-extensions \ --enable-optimizations \ + --enable-option-checking=fatal \ --enable-shared \ --with-system-expat \ --with-system-ffi \ --without-ensurepip \ && make -j "$(nproc)" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 - PROFILE_TASK='-m test.regrtest --pgo \ - test_array \ - test_base64 \ - test_binascii \ - test_binhex \ - test_binop \ - test_bytes \ - test_c_locale_coercion \ - test_class \ - test_cmath \ - test_codecs \ - test_compile \ - test_complex \ - test_csv \ - test_decimal \ - test_dict \ - test_float \ - test_fstring \ - test_hashlib \ - test_io \ - test_iter \ - test_json \ - test_long \ - test_math \ - test_memoryview \ - test_pickle \ - test_re \ - test_set \ - test_slice \ - test_struct \ - test_threading \ - test_time \ - test_traceback \ - test_unicode \ - ' \ && make install \ - && ldconfig \ + && rm -rf /usr/src/python \ \ && find /usr/local -depth \ \( \ \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \ - \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ + -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python \ + \ + && ldconfig \ \ && python3 --version @@ -102,11 +69,15 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 19.1.1 +ENV PYTHON_PIP_VERSION 22.3.1 +# https://github.com/pypa/get-pip +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN set -ex; \ \ - wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \ + wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ + echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \ \ python get-pip.py \ --disable-pip-version-check \ diff --git a/3.6/jessie/slim/Dockerfile b/3.11/buster/slim/Dockerfile similarity index 77% rename from 3.6/jessie/slim/Dockerfile rename to 3.11/buster/slim/Dockerfile index 62d9646f7..c0cc65e72 100644 --- a/3.6/jessie/slim/Dockerfile +++ b/3.11/buster/slim/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM debian:jessie-slim +FROM debian:buster-slim # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -19,8 +19,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ netbase \ && rm -rf /var/lib/apt/lists/* -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.9 +ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION 3.11.1 RUN set -ex \ \ @@ -28,6 +28,7 @@ RUN set -ex \ && apt-get update && apt-get install -y --no-install-recommends \ dpkg-dev \ gcc \ + libbluetooth-dev \ libbz2-dev \ libc6-dev \ libexpat1-dev \ @@ -40,6 +41,7 @@ RUN set -ex \ libssl-dev \ make \ tk-dev \ + uuid-dev \ wget \ xz-utils \ zlib1g-dev \ @@ -49,7 +51,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -63,48 +65,22 @@ RUN set -ex \ --build="$gnuArch" \ --enable-loadable-sqlite-extensions \ --enable-optimizations \ + --enable-option-checking=fatal \ --enable-shared \ --with-system-expat \ --with-system-ffi \ --without-ensurepip \ && make -j "$(nproc)" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 - PROFILE_TASK='-m test.regrtest --pgo \ - test_array \ - test_base64 \ - test_binascii \ - test_binhex \ - test_binop \ - test_bytes \ - test_c_locale_coercion \ - test_class \ - test_cmath \ - test_codecs \ - test_compile \ - test_complex \ - test_csv \ - test_decimal \ - test_dict \ - test_float \ - test_fstring \ - test_hashlib \ - test_io \ - test_iter \ - test_json \ - test_long \ - test_math \ - test_memoryview \ - test_pickle \ - test_re \ - test_set \ - test_slice \ - test_struct \ - test_threading \ - test_time \ - test_traceback \ - test_unicode \ - ' \ + LDFLAGS="-Wl,--strip-all" \ && make install \ + && rm -rf /usr/src/python \ + \ + && find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ + -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \ + \) -exec rm -rf '{}' + \ + \ && ldconfig \ \ && apt-mark auto '.*' > /dev/null \ @@ -119,14 +95,6 @@ RUN set -ex \ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && rm -rf /var/lib/apt/lists/* \ \ - && find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \ - \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ - \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python \ - \ && python3 --version # make some useful symlinks that are expected to exist @@ -137,7 +105,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 19.1.1 +ENV PYTHON_PIP_VERSION 22.3.1 +# https://github.com/pypa/get-pip +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN set -ex; \ \ @@ -145,7 +116,8 @@ RUN set -ex; \ apt-get update; \ apt-get install -y --no-install-recommends wget; \ \ - wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \ + wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ + echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \ \ apt-mark auto '.*' > /dev/null; \ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ diff --git a/3.11/windows/windowsservercore-1809/Dockerfile b/3.11/windows/windowsservercore-1809/Dockerfile new file mode 100644 index 000000000..fe686b3bf --- /dev/null +++ b/3.11/windows/windowsservercore-1809/Dockerfile @@ -0,0 +1,72 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:1809 + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV PYTHON_VERSION 3.11.1 +ENV PYTHON_RELEASE 3.11.1 + +RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \ + Write-Host ('Downloading {0} ...' -f $url); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \ + \ + Write-Host 'Installing ...'; \ +# https://docs.python.org/3.5/using/windows.html#installing-without-ui + Start-Process python.exe -Wait \ + -ArgumentList @( \ + '/quiet', \ + 'InstallAllUsers=1', \ + 'TargetDir=C:\Python', \ + 'PrependPath=1', \ + 'Shortcuts=0', \ + 'Include_doc=0', \ + 'Include_pip=0', \ + 'Include_test=0' \ + ); \ + \ +# the installer updated PATH, so we should refresh our local value + $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' python --version'; python --version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item python.exe -Force; \ + \ + Write-Host 'Complete.' + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION 22.3.1 +# https://github.com/pypa/get-pip +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 + +RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $env:PYTHON_GET_PIP_URL -OutFile 'get-pip.py'; \ + Write-Host ('Verifying sha256 ({0}) ...' -f $env:PYTHON_GET_PIP_SHA256); \ + if ((Get-FileHash 'get-pip.py' -Algorithm sha256).Hash -ne $env:PYTHON_GET_PIP_SHA256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \ + python get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + ('pip=={0}' -f $env:PYTHON_PIP_VERSION) \ + ; \ + Remove-Item get-pip.py -Force; \ + \ + Write-Host 'Verifying pip install ...'; \ + pip --version; \ + \ + Write-Host 'Complete.' + +CMD ["python"] diff --git a/3.11/windows/windowsservercore-ltsc2016/Dockerfile b/3.11/windows/windowsservercore-ltsc2016/Dockerfile new file mode 100644 index 000000000..a5562ad93 --- /dev/null +++ b/3.11/windows/windowsservercore-ltsc2016/Dockerfile @@ -0,0 +1,72 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:ltsc2016 + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV PYTHON_VERSION 3.11.1 +ENV PYTHON_RELEASE 3.11.1 + +RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \ + Write-Host ('Downloading {0} ...' -f $url); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \ + \ + Write-Host 'Installing ...'; \ +# https://docs.python.org/3.5/using/windows.html#installing-without-ui + Start-Process python.exe -Wait \ + -ArgumentList @( \ + '/quiet', \ + 'InstallAllUsers=1', \ + 'TargetDir=C:\Python', \ + 'PrependPath=1', \ + 'Shortcuts=0', \ + 'Include_doc=0', \ + 'Include_pip=0', \ + 'Include_test=0' \ + ); \ + \ +# the installer updated PATH, so we should refresh our local value + $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' python --version'; python --version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item python.exe -Force; \ + \ + Write-Host 'Complete.' + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION 22.3.1 +# https://github.com/pypa/get-pip +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 + +RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $env:PYTHON_GET_PIP_URL -OutFile 'get-pip.py'; \ + Write-Host ('Verifying sha256 ({0}) ...' -f $env:PYTHON_GET_PIP_SHA256); \ + if ((Get-FileHash 'get-pip.py' -Algorithm sha256).Hash -ne $env:PYTHON_GET_PIP_SHA256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \ + python get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + ('pip=={0}' -f $env:PYTHON_PIP_VERSION) \ + ; \ + Remove-Item get-pip.py -Force; \ + \ + Write-Host 'Verifying pip install ...'; \ + pip --version; \ + \ + Write-Host 'Complete.' + +CMD ["python"] diff --git a/3.6/alpine3.11/Dockerfile b/3.6/alpine3.11/Dockerfile deleted file mode 100644 index 61089fc19..000000000 --- a/3.6/alpine3.11/Dockerfile +++ /dev/null @@ -1,172 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.11 - -# 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. -ENV LANG C.UTF-8 - -# install ca-certificates so that HTTPS works consistently -# other runtime dependencies for Python are installed later -RUN apk add --no-cache ca-certificates - -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.12 - -RUN set -ex \ - && apk add --no-cache --virtual .fetch-deps \ - gnupg \ - tar \ - xz \ - \ - && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ - && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ - && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ - && gpg --batch --verify python.tar.xz.asc python.tar.xz \ - && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ - && rm -rf "$GNUPGHOME" python.tar.xz.asc \ - && mkdir -p /usr/src/python \ - && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ - && rm python.tar.xz \ - \ - && apk add --no-cache --virtual .build-deps \ - bluez-dev \ - bzip2-dev \ - coreutils \ - dpkg-dev dpkg \ - expat-dev \ - findutils \ - gcc \ - gdbm-dev \ - libc-dev \ - libffi-dev \ - libnsl-dev \ - libtirpc-dev \ - linux-headers \ - make \ - ncurses-dev \ - openssl-dev \ - pax-utils \ - readline-dev \ - sqlite-dev \ - tcl-dev \ - tk \ - tk-dev \ - xz-dev \ - zlib-dev \ -# add build deps before removing fetch deps in case there's overlap - && apk del --no-network .fetch-deps \ - \ - && cd /usr/src/python \ - && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ - && ./configure \ - --build="$gnuArch" \ - --enable-loadable-sqlite-extensions \ - --enable-optimizations \ - --enable-option-checking=fatal \ - --enable-shared \ - --with-system-expat \ - --with-system-ffi \ - --without-ensurepip \ - && make -j "$(nproc)" \ -# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() -# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 - EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \ - LDFLAGS="-Wl,--strip-all" \ -# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 - PROFILE_TASK='-m test.regrtest --pgo \ - test_array \ - test_base64 \ - test_binascii \ - test_binhex \ - test_binop \ - test_bytes \ - test_c_locale_coercion \ - test_class \ - test_cmath \ - test_codecs \ - test_compile \ - test_complex \ - test_csv \ - test_decimal \ - test_dict \ - test_float \ - test_fstring \ - test_hashlib \ - test_io \ - test_iter \ - test_json \ - test_long \ - test_math \ - test_memoryview \ - test_pickle \ - test_re \ - test_set \ - test_slice \ - test_struct \ - test_threading \ - test_time \ - test_traceback \ - test_unicode \ - ' \ - && make install \ - && rm -rf /usr/src/python \ - \ - && find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \ - -o \( -type f -a -name 'wininst-*.exe' \) \ - \) -exec rm -rf '{}' + \ - \ - && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - | xargs -rt apk add --no-cache --virtual .python-rundeps \ - && apk del --no-network .build-deps \ - \ - && python3 --version - -# make some useful symlinks that are expected to exist -RUN cd /usr/local/bin \ - && ln -s idle3 idle \ - && ln -s pydoc3 pydoc \ - && ln -s python3 python \ - && ln -s python3-config python-config - -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c - -RUN set -ex; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - "pip==$PYTHON_PIP_VERSION" \ - ; \ - pip --version; \ - \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \ - \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ - \) -exec rm -rf '{}' +; \ - rm -f get-pip.py - -CMD ["python3"] diff --git a/3.6/alpine3.12/Dockerfile b/3.6/alpine3.12/Dockerfile deleted file mode 100644 index 9ffd45a75..000000000 --- a/3.6/alpine3.12/Dockerfile +++ /dev/null @@ -1,172 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.12 - -# 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. -ENV LANG C.UTF-8 - -# install ca-certificates so that HTTPS works consistently -# other runtime dependencies for Python are installed later -RUN apk add --no-cache ca-certificates - -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.12 - -RUN set -ex \ - && apk add --no-cache --virtual .fetch-deps \ - gnupg \ - tar \ - xz \ - \ - && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ - && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ - && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ - && gpg --batch --verify python.tar.xz.asc python.tar.xz \ - && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ - && rm -rf "$GNUPGHOME" python.tar.xz.asc \ - && mkdir -p /usr/src/python \ - && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ - && rm python.tar.xz \ - \ - && apk add --no-cache --virtual .build-deps \ - bluez-dev \ - bzip2-dev \ - coreutils \ - dpkg-dev dpkg \ - expat-dev \ - findutils \ - gcc \ - gdbm-dev \ - libc-dev \ - libffi-dev \ - libnsl-dev \ - libtirpc-dev \ - linux-headers \ - make \ - ncurses-dev \ - openssl-dev \ - pax-utils \ - readline-dev \ - sqlite-dev \ - tcl-dev \ - tk \ - tk-dev \ - xz-dev \ - zlib-dev \ -# add build deps before removing fetch deps in case there's overlap - && apk del --no-network .fetch-deps \ - \ - && cd /usr/src/python \ - && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ - && ./configure \ - --build="$gnuArch" \ - --enable-loadable-sqlite-extensions \ - --enable-optimizations \ - --enable-option-checking=fatal \ - --enable-shared \ - --with-system-expat \ - --with-system-ffi \ - --without-ensurepip \ - && make -j "$(nproc)" \ -# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() -# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 - EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \ - LDFLAGS="-Wl,--strip-all" \ -# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 - PROFILE_TASK='-m test.regrtest --pgo \ - test_array \ - test_base64 \ - test_binascii \ - test_binhex \ - test_binop \ - test_bytes \ - test_c_locale_coercion \ - test_class \ - test_cmath \ - test_codecs \ - test_compile \ - test_complex \ - test_csv \ - test_decimal \ - test_dict \ - test_float \ - test_fstring \ - test_hashlib \ - test_io \ - test_iter \ - test_json \ - test_long \ - test_math \ - test_memoryview \ - test_pickle \ - test_re \ - test_set \ - test_slice \ - test_struct \ - test_threading \ - test_time \ - test_traceback \ - test_unicode \ - ' \ - && make install \ - && rm -rf /usr/src/python \ - \ - && find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \ - -o \( -type f -a -name 'wininst-*.exe' \) \ - \) -exec rm -rf '{}' + \ - \ - && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - | xargs -rt apk add --no-cache --virtual .python-rundeps \ - && apk del --no-network .build-deps \ - \ - && python3 --version - -# make some useful symlinks that are expected to exist -RUN cd /usr/local/bin \ - && ln -s idle3 idle \ - && ln -s pydoc3 pydoc \ - && ln -s python3 python \ - && ln -s python3-config python-config - -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c - -RUN set -ex; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - "pip==$PYTHON_PIP_VERSION" \ - ; \ - pip --version; \ - \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \ - \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ - \) -exec rm -rf '{}' +; \ - rm -f get-pip.py - -CMD ["python3"] diff --git a/3.7/alpine3.11/Dockerfile b/3.7/alpine3.11/Dockerfile deleted file mode 100644 index 8e67175e3..000000000 --- a/3.7/alpine3.11/Dockerfile +++ /dev/null @@ -1,173 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.11 - -# 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. -ENV LANG C.UTF-8 - -# install ca-certificates so that HTTPS works consistently -# other runtime dependencies for Python are installed later -RUN apk add --no-cache ca-certificates - -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.7.9 - -RUN set -ex \ - && apk add --no-cache --virtual .fetch-deps \ - gnupg \ - tar \ - xz \ - \ - && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ - && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ - && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ - && gpg --batch --verify python.tar.xz.asc python.tar.xz \ - && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ - && rm -rf "$GNUPGHOME" python.tar.xz.asc \ - && mkdir -p /usr/src/python \ - && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ - && rm python.tar.xz \ - \ - && apk add --no-cache --virtual .build-deps \ - bluez-dev \ - bzip2-dev \ - coreutils \ - dpkg-dev dpkg \ - expat-dev \ - findutils \ - gcc \ - gdbm-dev \ - libc-dev \ - libffi-dev \ - libnsl-dev \ - libtirpc-dev \ - linux-headers \ - make \ - ncurses-dev \ - openssl-dev \ - pax-utils \ - readline-dev \ - sqlite-dev \ - tcl-dev \ - tk \ - tk-dev \ - util-linux-dev \ - xz-dev \ - zlib-dev \ -# add build deps before removing fetch deps in case there's overlap - && apk del --no-network .fetch-deps \ - \ - && cd /usr/src/python \ - && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ - && ./configure \ - --build="$gnuArch" \ - --enable-loadable-sqlite-extensions \ - --enable-optimizations \ - --enable-option-checking=fatal \ - --enable-shared \ - --with-system-expat \ - --with-system-ffi \ - --without-ensurepip \ - && make -j "$(nproc)" \ -# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() -# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 - EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \ - LDFLAGS="-Wl,--strip-all" \ -# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 - PROFILE_TASK='-m test.regrtest --pgo \ - test_array \ - test_base64 \ - test_binascii \ - test_binhex \ - test_binop \ - test_bytes \ - test_c_locale_coercion \ - test_class \ - test_cmath \ - test_codecs \ - test_compile \ - test_complex \ - test_csv \ - test_decimal \ - test_dict \ - test_float \ - test_fstring \ - test_hashlib \ - test_io \ - test_iter \ - test_json \ - test_long \ - test_math \ - test_memoryview \ - test_pickle \ - test_re \ - test_set \ - test_slice \ - test_struct \ - test_threading \ - test_time \ - test_traceback \ - test_unicode \ - ' \ - && make install \ - && rm -rf /usr/src/python \ - \ - && find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \ - -o \( -type f -a -name 'wininst-*.exe' \) \ - \) -exec rm -rf '{}' + \ - \ - && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - | xargs -rt apk add --no-cache --virtual .python-rundeps \ - && apk del --no-network .build-deps \ - \ - && python3 --version - -# make some useful symlinks that are expected to exist -RUN cd /usr/local/bin \ - && ln -s idle3 idle \ - && ln -s pydoc3 pydoc \ - && ln -s python3 python \ - && ln -s python3-config python-config - -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c - -RUN set -ex; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - "pip==$PYTHON_PIP_VERSION" \ - ; \ - pip --version; \ - \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \ - \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ - \) -exec rm -rf '{}' +; \ - rm -f get-pip.py - -CMD ["python3"] diff --git a/3.7/alpine3.12/Dockerfile b/3.7/alpine3.17/Dockerfile similarity index 93% rename from 3.7/alpine3.12/Dockerfile rename to 3.7/alpine3.17/Dockerfile index fcd81e039..9f0869360 100644 --- a/3.7/alpine3.12/Dockerfile +++ b/3.7/alpine3.17/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM alpine:3.12 +FROM alpine:3.17 # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -29,7 +29,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -145,10 +145,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN set -ex; \ \ diff --git a/3.6/buster/Dockerfile b/3.7/bionic/Dockerfile similarity index 82% rename from 3.6/buster/Dockerfile rename to 3.7/bionic/Dockerfile index 9db9a7d94..215250d4b 100644 --- a/3.6/buster/Dockerfile +++ b/3.7/bionic/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM buildpack-deps:buster +FROM vaporio/buildpack-deps:bionic # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -12,22 +12,32 @@ 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. ENV LANG C.UTF-8 +ENV DEBIAN_FRONTEND noninteractive # extra dependencies (over what buildpack-deps already includes) -RUN apt-get update && apt-get install -y --no-install-recommends \ +RUN apt-get update; \ + apt-get install -y --no-install-recommends \ libbluetooth-dev \ tk-dev \ + uuid-dev \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.12 +ENV PYTHON_VERSION 3.7.9 RUN set -ex \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && for server in $(shuf -e \ + ha.pool.sks-keyservers.net \ + hkp://p80.pool.sks-keyservers.net:80 \ + keyserver.ubuntu.com \ + hkp://keyserver.ubuntu.com:80 \ + pgp.mit.edu) ; do \ + gpg --batch --keyserver "$server" --recv-keys "$GPG_KEY" && break || : ; \ + done \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -105,10 +115,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN set -ex; \ \ diff --git a/3.6/buster/slim/Dockerfile b/3.7/bionic/lite/Dockerfile similarity index 86% rename from 3.6/buster/slim/Dockerfile rename to 3.7/bionic/lite/Dockerfile index c65e87814..42532c144 100644 --- a/3.6/buster/slim/Dockerfile +++ b/3.7/bionic/lite/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM debian:buster-slim +FROM vaporio/foundation:bionic # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -12,15 +12,17 @@ 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. ENV LANG C.UTF-8 +ENV DEBIAN_FRONTEND noninteractive # runtime dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ +RUN apt-get update; \ + apt-get install -y --no-install-recommends \ ca-certificates \ netbase \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.12 +ENV PYTHON_VERSION 3.7.9 RUN set -ex \ \ @@ -41,6 +43,7 @@ RUN set -ex \ libssl-dev \ make \ tk-dev \ + uuid-dev \ wget \ xz-utils \ zlib1g-dev \ @@ -50,7 +53,14 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && for server in $(shuf -e \ + ha.pool.sks-keyservers.net \ + hkp://p80.pool.sks-keyservers.net:80 \ + keyserver.ubuntu.com \ + hkp://keyserver.ubuntu.com:80 \ + pgp.mit.edu) ; do \ + gpg --batch --keyserver "$server" --recv-keys "$GPG_KEY" && break || : ; \ + done \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -141,10 +151,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN set -ex; \ \ diff --git a/3.7/buster/Dockerfile b/3.7/buster/Dockerfile index be1a8ffbc..c585b4a68 100644 --- a/3.7/buster/Dockerfile +++ b/3.7/buster/Dockerfile @@ -28,7 +28,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -106,10 +106,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN set -ex; \ \ diff --git a/3.7/buster/slim/Dockerfile b/3.7/buster/slim/Dockerfile index 33c29de86..dba7f9a05 100644 --- a/3.7/buster/slim/Dockerfile +++ b/3.7/buster/slim/Dockerfile @@ -51,7 +51,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -142,10 +142,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN set -ex; \ \ diff --git a/3.7/windows/windowsservercore-1809/Dockerfile b/3.7/windows/windowsservercore-1809/Dockerfile index 38a558010..8176453a3 100644 --- a/3.7/windows/windowsservercore-1809/Dockerfile +++ b/3.7/windows/windowsservercore-1809/Dockerfile @@ -42,10 +42,10 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env Write-Host 'Complete.' # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ diff --git a/3.7/windows/windowsservercore-ltsc2016/Dockerfile b/3.7/windows/windowsservercore-ltsc2016/Dockerfile index 4da2b22c7..7d2a2c996 100644 --- a/3.7/windows/windowsservercore-ltsc2016/Dockerfile +++ b/3.7/windows/windowsservercore-ltsc2016/Dockerfile @@ -42,10 +42,10 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env Write-Host 'Complete.' # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ diff --git a/3.8/alpine3.12/Dockerfile b/3.8/alpine3.17/Dockerfile similarity index 91% rename from 3.8/alpine3.12/Dockerfile rename to 3.8/alpine3.17/Dockerfile index 4771c5da6..d9de1483e 100644 --- a/3.8/alpine3.12/Dockerfile +++ b/3.8/alpine3.17/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM alpine:3.12 +FROM alpine:3.17 # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -18,7 +18,7 @@ ENV LANG C.UTF-8 RUN apk add --no-cache ca-certificates ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.8.6 +ENV PYTHON_VERSION 3.8.10 RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ @@ -29,7 +29,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -109,10 +109,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN set -ex; \ \ diff --git a/3.6/stretch/Dockerfile b/3.8/bionic/Dockerfile similarity index 67% rename from 3.6/stretch/Dockerfile rename to 3.8/bionic/Dockerfile index 91bbdaf6a..8fc314216 100644 --- a/3.6/stretch/Dockerfile +++ b/3.8/bionic/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM buildpack-deps:stretch +FROM vaporio/buildpack-deps:bionic # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -12,22 +12,32 @@ 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. ENV LANG C.UTF-8 +ENV DEBIAN_FRONTEND noninteractive # extra dependencies (over what buildpack-deps already includes) -RUN apt-get update && apt-get install -y --no-install-recommends \ +RUN apt-get update; \ + apt-get install -y --no-install-recommends \ libbluetooth-dev \ tk-dev \ + uuid-dev \ && rm -rf /var/lib/apt/lists/* -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.12 +ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 +ENV PYTHON_VERSION 3.8.10 RUN set -ex \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && for server in $(shuf -e \ + ha.pool.sks-keyservers.net \ + hkp://p80.pool.sks-keyservers.net:80 \ + keyserver.ubuntu.com \ + hkp://keyserver.ubuntu.com:80 \ + pgp.mit.edu) ; do \ + gpg --batch --keyserver "$server" --recv-keys "$GPG_KEY" && break || : ; \ + done \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -47,42 +57,6 @@ RUN set -ex \ --with-system-ffi \ --without-ensurepip \ && make -j "$(nproc)" \ -# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 - PROFILE_TASK='-m test.regrtest --pgo \ - test_array \ - test_base64 \ - test_binascii \ - test_binhex \ - test_binop \ - test_bytes \ - test_c_locale_coercion \ - test_class \ - test_cmath \ - test_codecs \ - test_compile \ - test_complex \ - test_csv \ - test_decimal \ - test_dict \ - test_float \ - test_fstring \ - test_hashlib \ - test_io \ - test_iter \ - test_json \ - test_long \ - test_math \ - test_memoryview \ - test_pickle \ - test_re \ - test_set \ - test_slice \ - test_struct \ - test_threading \ - test_time \ - test_traceback \ - test_unicode \ - ' \ && make install \ && rm -rf /usr/src/python \ \ @@ -105,10 +79,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN set -ex; \ \ diff --git a/3.6/stretch/slim/Dockerfile b/3.8/bionic/lite/Dockerfile similarity index 75% rename from 3.6/stretch/slim/Dockerfile rename to 3.8/bionic/lite/Dockerfile index e9db00100..3355b3e4b 100644 --- a/3.6/stretch/slim/Dockerfile +++ b/3.8/bionic/lite/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM debian:stretch-slim +FROM vaporio/foundation:bionic # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -12,15 +12,17 @@ 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. ENV LANG C.UTF-8 +ENV DEBIAN_FRONTEND noninteractive # runtime dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ +RUN apt-get update; \ + apt-get install -y --no-install-recommends \ ca-certificates \ netbase \ && rm -rf /var/lib/apt/lists/* -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.12 +ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 +ENV PYTHON_VERSION 3.8.10 RUN set -ex \ \ @@ -41,6 +43,7 @@ RUN set -ex \ libssl-dev \ make \ tk-dev \ + uuid-dev \ wget \ xz-utils \ zlib1g-dev \ @@ -50,7 +53,14 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && for server in $(shuf -e \ + ha.pool.sks-keyservers.net \ + hkp://p80.pool.sks-keyservers.net:80 \ + keyserver.ubuntu.com \ + hkp://keyserver.ubuntu.com:80 \ + pgp.mit.edu) ; do \ + gpg --batch --keyserver "$server" --recv-keys "$GPG_KEY" && break || : ; \ + done \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -71,42 +81,6 @@ RUN set -ex \ --without-ensurepip \ && make -j "$(nproc)" \ LDFLAGS="-Wl,--strip-all" \ -# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 - PROFILE_TASK='-m test.regrtest --pgo \ - test_array \ - test_base64 \ - test_binascii \ - test_binhex \ - test_binop \ - test_bytes \ - test_c_locale_coercion \ - test_class \ - test_cmath \ - test_codecs \ - test_compile \ - test_complex \ - test_csv \ - test_decimal \ - test_dict \ - test_float \ - test_fstring \ - test_hashlib \ - test_io \ - test_iter \ - test_json \ - test_long \ - test_math \ - test_memoryview \ - test_pickle \ - test_re \ - test_set \ - test_slice \ - test_struct \ - test_threading \ - test_time \ - test_traceback \ - test_unicode \ - ' \ && make install \ && rm -rf /usr/src/python \ \ @@ -141,10 +115,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN set -ex; \ \ diff --git a/3.8/buster/Dockerfile b/3.8/buster/Dockerfile index ea85676a5..76eb0b34e 100644 --- a/3.8/buster/Dockerfile +++ b/3.8/buster/Dockerfile @@ -21,14 +21,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.8.6 +ENV PYTHON_VERSION 3.8.10 RUN set -ex \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -70,10 +70,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN set -ex; \ \ diff --git a/3.8/buster/slim/Dockerfile b/3.8/buster/slim/Dockerfile index 74fee143e..a33d6cc38 100644 --- a/3.8/buster/slim/Dockerfile +++ b/3.8/buster/slim/Dockerfile @@ -20,7 +20,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.8.6 +ENV PYTHON_VERSION 3.8.10 RUN set -ex \ \ @@ -51,7 +51,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -106,10 +106,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN set -ex; \ \ diff --git a/3.8/windows/windowsservercore-1809/Dockerfile b/3.8/windows/windowsservercore-1809/Dockerfile index 9c2f6d4cb..a4167beb4 100644 --- a/3.8/windows/windowsservercore-1809/Dockerfile +++ b/3.8/windows/windowsservercore-1809/Dockerfile @@ -8,8 +8,8 @@ FROM mcr.microsoft.com/windows/servercore:1809 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -ENV PYTHON_VERSION 3.8.6 -ENV PYTHON_RELEASE 3.8.6 +ENV PYTHON_VERSION 3.8.10 +ENV PYTHON_RELEASE 3.8.10 RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \ Write-Host ('Downloading {0} ...' -f $url); \ @@ -42,10 +42,10 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env Write-Host 'Complete.' # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ diff --git a/3.8/windows/windowsservercore-ltsc2016/Dockerfile b/3.8/windows/windowsservercore-ltsc2016/Dockerfile index 30f335a31..beeb9201c 100644 --- a/3.8/windows/windowsservercore-ltsc2016/Dockerfile +++ b/3.8/windows/windowsservercore-ltsc2016/Dockerfile @@ -8,8 +8,8 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2016 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -ENV PYTHON_VERSION 3.8.6 -ENV PYTHON_RELEASE 3.8.6 +ENV PYTHON_VERSION 3.8.10 +ENV PYTHON_RELEASE 3.8.10 RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \ Write-Host ('Downloading {0} ...' -f $url); \ @@ -42,10 +42,10 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env Write-Host 'Complete.' # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ diff --git a/3.9/alpine3.12/Dockerfile b/3.9/alpine3.17/Dockerfile similarity index 91% rename from 3.9/alpine3.12/Dockerfile rename to 3.9/alpine3.17/Dockerfile index c810b8cfa..d71c83f79 100644 --- a/3.9/alpine3.12/Dockerfile +++ b/3.9/alpine3.17/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM alpine:3.12 +FROM alpine:3.17 # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -18,7 +18,7 @@ ENV LANG C.UTF-8 RUN apk add --no-cache ca-certificates ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.9.0 +ENV PYTHON_VERSION 3.9.13 RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ @@ -29,7 +29,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -108,10 +108,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN set -ex; \ \ diff --git a/3.9/bionic/Dockerfile b/3.9/bionic/Dockerfile new file mode 100644 index 000000000..7e5a2dd02 --- /dev/null +++ b/3.9/bionic/Dockerfile @@ -0,0 +1,106 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM vaporio/buildpack-deps:bionic + +# 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. +ENV LANG C.UTF-8 +ENV DEBIAN_FRONTEND noninteractive + +# extra dependencies (over what buildpack-deps already includes) +RUN apt-get update; \ + apt-get install -y --no-install-recommends \ + libbluetooth-dev \ + tk-dev \ + uuid-dev \ + && rm -rf /var/lib/apt/lists/* + +ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 +ENV PYTHON_VERSION 3.9.13 + +RUN set -ex \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && for server in $(shuf -e \ + ha.pool.sks-keyservers.net \ + hkp://p80.pool.sks-keyservers.net:80 \ + keyserver.ubuntu.com \ + hkp://keyserver.ubuntu.com:80 \ + pgp.mit.edu) ; do \ + gpg --batch --keyserver "$server" --recv-keys "$GPG_KEY" && break || : ; \ + done \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ + && rm -rf "$GNUPGHOME" python.tar.xz.asc \ + && mkdir -p /usr/src/python \ + && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ + && rm python.tar.xz \ + \ + && cd /usr/src/python \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ + && ./configure \ + --build="$gnuArch" \ + --enable-loadable-sqlite-extensions \ + --enable-optimizations \ + --enable-option-checking=fatal \ + --enable-shared \ + --with-system-expat \ + --with-system-ffi \ + --without-ensurepip \ + && make -j "$(nproc)" \ + && make install \ + && rm -rf /usr/src/python \ + \ + && find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ + -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \ + \) -exec rm -rf '{}' + \ + \ + && ldconfig \ + \ + && python3 --version + +# make some useful symlinks that are expected to exist +RUN cd /usr/local/bin \ + && ln -s idle3 idle \ + && ln -s pydoc3 pydoc \ + && ln -s python3 python \ + && ln -s python3-config python-config + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION 22.3.1 +# https://github.com/pypa/get-pip +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 + +RUN set -ex; \ + \ + wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ + echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \ + \ + python get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + "pip==$PYTHON_PIP_VERSION" \ + ; \ + pip --version; \ + \ + find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ + -o \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ + \) -exec rm -rf '{}' +; \ + rm -f get-pip.py + +CMD ["python3"] diff --git a/3.9/bionic/lite/Dockerfile b/3.9/bionic/lite/Dockerfile new file mode 100644 index 000000000..5bd78e82d --- /dev/null +++ b/3.9/bionic/lite/Dockerfile @@ -0,0 +1,151 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM vaporio/foundation:bionic + +# 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. +ENV LANG C.UTF-8 +ENV DEBIAN_FRONTEND noninteractive + +# runtime dependencies +RUN apt-get update; \ + apt-get install -y --no-install-recommends \ + ca-certificates \ + netbase \ + && rm -rf /var/lib/apt/lists/* + +ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 +ENV PYTHON_VERSION 3.9.13 + +RUN set -ex \ + \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ + dpkg-dev \ + gcc \ + libbluetooth-dev \ + libbz2-dev \ + libc6-dev \ + libexpat1-dev \ + libffi-dev \ + libgdbm-dev \ + liblzma-dev \ + libncursesw5-dev \ + libreadline-dev \ + libsqlite3-dev \ + libssl-dev \ + make \ + tk-dev \ + uuid-dev \ + wget \ + xz-utils \ + zlib1g-dev \ +# as of Stretch, "gpg" is no longer included by default + $(command -v gpg > /dev/null || echo 'gnupg dirmngr') \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && for server in $(shuf -e \ + ha.pool.sks-keyservers.net \ + hkp://p80.pool.sks-keyservers.net:80 \ + keyserver.ubuntu.com \ + hkp://keyserver.ubuntu.com:80 \ + pgp.mit.edu) ; do \ + gpg --batch --keyserver "$server" --recv-keys "$GPG_KEY" && break || : ; \ + done \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ + && rm -rf "$GNUPGHOME" python.tar.xz.asc \ + && mkdir -p /usr/src/python \ + && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ + && rm python.tar.xz \ + \ + && cd /usr/src/python \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ + && ./configure \ + --build="$gnuArch" \ + --enable-loadable-sqlite-extensions \ + --enable-optimizations \ + --enable-option-checking=fatal \ + --enable-shared \ + --with-system-expat \ + --with-system-ffi \ + --without-ensurepip \ + && make -j "$(nproc)" \ + LDFLAGS="-Wl,--strip-all" \ + && make install \ + && rm -rf /usr/src/python \ + \ + && find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ + -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \ + \) -exec rm -rf '{}' + \ + \ + && ldconfig \ + \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ + | awk '/=>/ { print $(NF-1) }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -r apt-mark manual \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && rm -rf /var/lib/apt/lists/* \ + \ + && python3 --version + +# make some useful symlinks that are expected to exist +RUN cd /usr/local/bin \ + && ln -s idle3 idle \ + && ln -s pydoc3 pydoc \ + && ln -s python3 python \ + && ln -s python3-config python-config + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION 22.3.1 +# https://github.com/pypa/get-pip +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 + +RUN set -ex; \ + \ + 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 --check --strict -; \ + \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + rm -rf /var/lib/apt/lists/*; \ + \ + python get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + "pip==$PYTHON_PIP_VERSION" \ + ; \ + pip --version; \ + \ + find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ + -o \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ + \) -exec rm -rf '{}' +; \ + rm -f get-pip.py + +CMD ["python3"] diff --git a/3.9/buster/Dockerfile b/3.9/buster/Dockerfile index 1fe2d7e46..0985946ba 100644 --- a/3.9/buster/Dockerfile +++ b/3.9/buster/Dockerfile @@ -21,14 +21,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.9.0 +ENV PYTHON_VERSION 3.9.13 RUN set -ex \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -69,10 +69,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN set -ex; \ \ diff --git a/3.9/buster/slim/Dockerfile b/3.9/buster/slim/Dockerfile index 070e9cad2..38206f8c6 100644 --- a/3.9/buster/slim/Dockerfile +++ b/3.9/buster/slim/Dockerfile @@ -20,7 +20,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.9.0 +ENV PYTHON_VERSION 3.9.13 RUN set -ex \ \ @@ -51,7 +51,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -105,10 +105,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN set -ex; \ \ diff --git a/3.9/windows/windowsservercore-1809/Dockerfile b/3.9/windows/windowsservercore-1809/Dockerfile index 072f3d114..173b87f84 100644 --- a/3.9/windows/windowsservercore-1809/Dockerfile +++ b/3.9/windows/windowsservercore-1809/Dockerfile @@ -8,8 +8,8 @@ FROM mcr.microsoft.com/windows/servercore:1809 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -ENV PYTHON_VERSION 3.9.0 -ENV PYTHON_RELEASE 3.9.0 +ENV PYTHON_VERSION 3.9.13 +ENV PYTHON_RELEASE 3.9.13 RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \ Write-Host ('Downloading {0} ...' -f $url); \ @@ -42,10 +42,10 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env Write-Host 'Complete.' # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ diff --git a/3.9/windows/windowsservercore-ltsc2016/Dockerfile b/3.9/windows/windowsservercore-ltsc2016/Dockerfile index c47255313..995939de4 100644 --- a/3.9/windows/windowsservercore-ltsc2016/Dockerfile +++ b/3.9/windows/windowsservercore-ltsc2016/Dockerfile @@ -8,8 +8,8 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2016 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -ENV PYTHON_VERSION 3.9.0 -ENV PYTHON_RELEASE 3.9.0 +ENV PYTHON_VERSION 3.9.13 +ENV PYTHON_RELEASE 3.9.13 RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \ Write-Host ('Downloading {0} ...' -f $url); \ @@ -42,10 +42,10 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env Write-Host 'Complete.' # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION 22.3.1 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py +ENV PYTHON_GET_PIP_SHA256 1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6 RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index b387d1928..bb342d1d9 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -23,7 +23,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ diff --git a/Dockerfile-caveman-lite.template b/Dockerfile-caveman-lite.template new file mode 100644 index 000000000..09792dce4 --- /dev/null +++ b/Dockerfile-caveman-lite.template @@ -0,0 +1,128 @@ +FROM vaporio/foundation:%%PLACEHOLDER%% + +# 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. +ENV LANG C.UTF-8 +# https://github.com/docker-library/python/issues/147 +ENV PYTHONIOENCODING UTF-8 + +# runtime dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates \ + netbase \ + && rm -rf /var/lib/apt/lists/* + +ENV GPG_KEY %%PLACEHOLDER%% +ENV PYTHON_VERSION %%PLACEHOLDER%% + +RUN set -ex \ + \ + && export DEBIAN_FRONTEND=noninteractive; \ + export DEBCONF_NONINTERACTIVE_SEEN=true; \ + echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections; \ + echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ + dpkg-dev \ + gcc \ + libbz2-dev \ + libc6-dev \ + libdb-dev \ + libgdbm-dev \ + libncursesw5-dev \ + libreadline-dev \ + libsqlite3-dev \ + libssl-dev \ + make \ + tk-dev \ + wget \ + xz-utils \ + zlib1g-dev \ +# as of Stretch, "gpg" is no longer included by default + $(command -v gpg > /dev/null || echo 'gnupg dirmngr') \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && for server in $(shuf -e \ + ha.pool.sks-keyservers.net \ + hkp://p80.pool.sks-keyservers.net:80 \ + keyserver.ubuntu.com \ + hkp://keyserver.ubuntu.com:80 \ + pgp.mit.edu) ; do \ + gpg --batch --keyserver "$server" --recv-keys "$GPG_KEY" && break || : ; \ + done \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ + && rm -rf "$GNUPGHOME" python.tar.xz.asc \ + && mkdir -p /usr/src/python \ + && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ + && rm python.tar.xz \ + \ + && cd /usr/src/python \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ + && ./configure \ + --build="$gnuArch" \ + --enable-shared \ + --enable-unicode=ucs4 \ + && make -j "$(nproc)" \ + && make install \ + && ldconfig \ + \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ + | awk '/=>/ { print $(NF-1) }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -r apt-mark manual \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && rm -rf /var/lib/apt/lists/* \ + \ + && find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests \) \) \ + -o \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ + \) -exec rm -rf '{}' + \ + && rm -rf /usr/src/python \ + \ + && python2 --version + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION %%PLACEHOLDER%% + +RUN set -ex; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends wget; \ + \ + wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \ + \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + rm -rf /var/lib/apt/lists/*; \ + \ + python get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + "pip==$PYTHON_PIP_VERSION" \ + ; \ + pip --version; \ + \ + find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests \) \) \ + -o \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ + \) -exec rm -rf '{}' +; \ + rm -f get-pip.py + +CMD ["python2"] diff --git a/Dockerfile-caveman-ubuntu.template b/Dockerfile-caveman-ubuntu.template new file mode 100644 index 000000000..2d9fa7e3c --- /dev/null +++ b/Dockerfile-caveman-ubuntu.template @@ -0,0 +1,89 @@ +FROM vaporio/buildpack-deps:%%PLACEHOLDER%% + +# 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. +ENV LANG C.UTF-8 +# https://github.com/docker-library/python/issues/147 +ENV PYTHONIOENCODING UTF-8 + +# extra dependencies (over what buildpack-deps already includes) +RUN export DEBIAN_FRONTEND=noninteractive; \ + export DEBCONF_NONINTERACTIVE_SEEN=true; \ + echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections; \ + echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections; \ + apt-get update -y && apt-get install -y --no-install-recommends \ + tk-dev \ + && rm -rf /var/lib/apt/lists/* + +ENV GPG_KEY %%PLACEHOLDER%% +ENV PYTHON_VERSION %%PLACEHOLDER%% + +RUN set -ex \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && for server in $(shuf -e \ + ha.pool.sks-keyservers.net \ + hkp://p80.pool.sks-keyservers.net:80 \ + keyserver.ubuntu.com \ + hkp://keyserver.ubuntu.com:80 \ + pgp.mit.edu) ; do \ + gpg --batch --keyserver "$server" --recv-keys "$GPG_KEY" && break || : ; \ + done \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ + && rm -rf "$GNUPGHOME" python.tar.xz.asc \ + && mkdir -p /usr/src/python \ + && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ + && rm python.tar.xz \ + \ + && cd /usr/src/python \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ + && ./configure \ + --build="$gnuArch" \ + --enable-shared \ + --enable-unicode=ucs4 \ + && make -j "$(nproc)" \ + && make install \ + && ldconfig \ + \ + && find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests \) \) \ + -o \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ + \) -exec rm -rf '{}' + \ + && rm -rf /usr/src/python \ + \ + && python2 --version + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION %%PLACEHOLDER%% + +RUN set -ex; \ + \ + wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \ + \ + python get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + "pip==$PYTHON_PIP_VERSION" \ + ; \ + pip --version; \ + \ + find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests \) \) \ + -o \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ + \) -exec rm -rf '{}' +; \ + rm -f get-pip.py + +# install "virtualenv", since the vast majority of users of this image will want it +RUN pip install --no-cache-dir virtualenv + +CMD ["python2"] diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index 6f0b37388..858d6e1e9 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -22,7 +22,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ diff --git a/3.7/stretch/slim/Dockerfile b/Dockerfile-lite.template similarity index 87% rename from 3.7/stretch/slim/Dockerfile rename to Dockerfile-lite.template index e5503c57a..9761f8025 100644 --- a/3.7/stretch/slim/Dockerfile +++ b/Dockerfile-lite.template @@ -1,10 +1,4 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:stretch-slim +FROM vaporio/foundation:%%PLACEHOLDER%% # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -12,15 +6,17 @@ 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. ENV LANG C.UTF-8 +ENV DEBIAN_FRONTEND noninteractive # runtime dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ +RUN apt-get update; \ + apt-get install -y --no-install-recommends \ ca-certificates \ netbase \ && rm -rf /var/lib/apt/lists/* -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.7.9 +ENV GPG_KEY %%PLACEHOLDER%% +ENV PYTHON_VERSION %%PLACEHOLDER%% RUN set -ex \ \ @@ -51,7 +47,14 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && for server in $(shuf -e \ + ha.pool.sks-keyservers.net \ + hkp://p80.pool.sks-keyservers.net:80 \ + keyserver.ubuntu.com \ + hkp://keyserver.ubuntu.com:80 \ + pgp.mit.edu) ; do \ + gpg --batch --keyserver "$server" --recv-keys "$GPG_KEY" && break || : ; \ + done \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -142,10 +145,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION %%PLACEHOLDER%% # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL %%PLACEHOLDER%% +ENV PYTHON_GET_PIP_SHA256 %%PLACEHOLDER%% RUN set -ex; \ \ diff --git a/Dockerfile-slim.template b/Dockerfile-slim.template index 7c079a426..43cd698af 100644 --- a/Dockerfile-slim.template +++ b/Dockerfile-slim.template @@ -45,7 +45,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ diff --git a/3.7/stretch/Dockerfile b/Dockerfile-ubuntu.template similarity index 83% rename from 3.7/stretch/Dockerfile rename to Dockerfile-ubuntu.template index 7d4f97bf4..a40927382 100644 --- a/3.7/stretch/Dockerfile +++ b/Dockerfile-ubuntu.template @@ -1,10 +1,4 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:stretch +FROM vaporio/buildpack-deps:%%PLACEHOLDER%% # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -12,23 +6,32 @@ 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. ENV LANG C.UTF-8 +ENV DEBIAN_FRONTEND noninteractive # extra dependencies (over what buildpack-deps already includes) -RUN apt-get update && apt-get install -y --no-install-recommends \ +RUN apt-get update; \ + apt-get install -y --no-install-recommends \ libbluetooth-dev \ tk-dev \ uuid-dev \ && rm -rf /var/lib/apt/lists/* -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.7.9 +ENV GPG_KEY %%PLACEHOLDER%% +ENV PYTHON_VERSION %%PLACEHOLDER%% RUN set -ex \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && for server in $(shuf -e \ + ha.pool.sks-keyservers.net \ + hkp://p80.pool.sks-keyservers.net:80 \ + keyserver.ubuntu.com \ + hkp://keyserver.ubuntu.com:80 \ + pgp.mit.edu) ; do \ + gpg --batch --keyserver "$server" --recv-keys "$GPG_KEY" && break || : ; \ + done \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ @@ -106,10 +109,10 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 20.2.3 +ENV PYTHON_PIP_VERSION %%PLACEHOLDER%% # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c +ENV PYTHON_GET_PIP_URL %%PLACEHOLDER%% +ENV PYTHON_GET_PIP_SHA256 %%PLACEHOLDER%% RUN set -ex; \ \ diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index d28d08391..334aa4149 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -2,15 +2,14 @@ set -Eeuo pipefail declare -A aliases=( - [3.10-rc]='rc' - [3.9]='3 latest' + [3.11]='3 latest' ) defaultDebianSuite='buster' # TODO buster declare -A debianSuites=( #[3.8-rc]='buster' ) -defaultAlpineVersion='3.12' +defaultAlpineVersion='3.17' self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" @@ -79,7 +78,7 @@ for version in "${versions[@]}"; do for v in \ {buster,stretch}{,/slim} \ - alpine{3.12,3.11} \ + alpine{3.17,3.16} \ windows/windowsservercore-{ltsc2016,1809} \ ; do dir="$version/$v" diff --git a/update.sh b/update.sh index 08521a84b..926be5fec 100755 --- a/update.sh +++ b/update.sh @@ -1,13 +1,10 @@ #!/usr/bin/env bash +set -x set -Eeuo pipefail shopt -s nullglob # https://www.python.org/downloads/23Introduction (under "OpenPGP Public Keys") declare -A gpgKeys=( - # gpg: key AA65421D: public key "Ned Deily (Python release signing key) " imported - [3.6]='0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D' - # https://www.python.org/dev/peps/pep-0494/#release-manager-and-crew - # gpg: key AA65421D: public key "Ned Deily (Python release signing key) " imported [3.7]='0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D' # https://www.python.org/dev/peps/pep-0537/#release-manager-and-crew @@ -23,6 +20,10 @@ declare -A gpgKeys=( # gpg: key 64E628F8D684696D: public key "Pablo Galindo Salgado " imported [3.10]='A035C8C19219BA821ECEA86B64E628F8D684696D' # https://www.python.org/dev/peps/pep-0619/#release-manager-and-crew + + # gpg: key 64E628F8D684696D: public key "Pablo Galindo Salgado " imported + [3.11]='A035C8C19219BA821ECEA86B64E628F8D684696D' + # https://www.python.org/dev/peps/pep-0664/#release-manager-and-crew ) cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" @@ -34,8 +35,8 @@ fi versions=( "${versions[@]%/}" ) pipVersion="$(curl -fsSL 'https://pypi.org/pypi/pip/json' | jq -r .info.version)" -getPipCommit="$(curl -fsSL 'https://github.com/pypa/get-pip/commits/master/get-pip.py.atom' | tac|tac | awk -F '[[:space:]]*[<>/]+' '$2 == "id" && $3 ~ /Commit/ { print $4; exit }')" -getPipUrl="https://github.com/pypa/get-pip/raw/$getPipCommit/get-pip.py" +getPipCommit="$(curl -fsSL 'https://github.com/pypa/get-pip/commits/main/public/get-pip.py.atom' | tac|tac | awk -F '[[:space:]]*[<>/]+' '$2 == "id" && $3 ~ /Commit/ { print $4; exit }')" +getPipUrl="https://github.com/pypa/get-pip/raw/$getPipCommit/public/get-pip.py" getPipSha256="$(curl -fsSL "$getPipUrl" | sha256sum | cut -d' ' -f1)" generated_warning() { @@ -132,9 +133,10 @@ for version in "${versions[@]}"; do echo "$version: $fullVersion" for v in \ - alpine{3.11,3.12} \ + alpine{3.16,3.17} \ {stretch,buster}{/slim,} \ windows/windowsservercore-{1809,ltsc2016} \ + bionic{/lite,} \ ; do dir="$version/$v" variant="$(basename "$v")" @@ -143,8 +145,10 @@ for version in "${versions[@]}"; do case "$variant" in slim) template="$variant"; tag="$(basename "$(dirname "$dir")")" ;; + lite) template="$variant"; tag="$(basename "$(dirname "$dir")")" ;; windowsservercore-*) template='windowsservercore'; tag="${variant#*-}" ;; alpine*) template='alpine'; tag="${variant#alpine}" ;; + bionic) template='ubuntu'; tag="$variant" ;; *) template='debian'; tag="$variant" ;; esac if [ "$variant" = 'slim' ]; then @@ -163,21 +167,9 @@ for version in "${versions[@]}"; do -e 's!^(ENV PYTHON_GET_PIP_URL) .*!\1 '"$getPipUrl"'!' \ -e 's!^(ENV PYTHON_GET_PIP_SHA256) .*!\1 '"$getPipSha256"'!' \ -e 's/^(FROM python):.*/\1:'"$version-$tag"'/' \ - -e 's!^(FROM (debian|buildpack-deps|alpine|mcr[.]microsoft[.]com/[^:]+)):.*!\1:'"$tag"'!' \ + -e 's!^(FROM (debian|buildpack-deps|vaporio/foundation|vaporio/buildpack-deps|alpine|mcr[.]microsoft[.]com/[^:]+)):.*!\1:'"$tag"'!' \ "$dir/Dockerfile" - case "$rcVersion/$v" in - # https://bugs.python.org/issue11063, https://bugs.python.org/issue20519 (Python 3.7.0+) - # A new native _uuid module improves uuid import time and avoids using ctypes. - # This requires the development libuuid headers. - 3.6/alpine*) - sed -ri -e '/util-linux-dev/d' "$dir/Dockerfile" - ;; - 3.6/*) - sed -ri -e '/uuid-dev/d' "$dir/Dockerfile" - ;; - esac - major="${rcVersion%%.*}" minor="${rcVersion#$major.}" minor="${minor%%.*}"