From 602691aae3e83585b57f9295018c5fd44bf939e1 Mon Sep 17 00:00:00 2001 From: Daniel Schulz Date: Sun, 6 Dec 2020 20:20:20 +0100 Subject: [PATCH 01/19] removed Windows- and Debian-based Dockerfiles -- not needed for my Engagement and scope; updated LICENSE file --- 3.10-rc/buster/Dockerfile | 97 ---------- 3.10-rc/buster/slim/Dockerfile | 146 -------------- .../windows/windowsservercore-1809/Dockerfile | 75 -------- .../windowsservercore-ltsc2016/Dockerfile | 75 -------- 3.6/buster/Dockerfile | 133 ------------- 3.6/buster/slim/Dockerfile | 181 ----------------- 3.6/jessie/Dockerfile | 126 ------------ 3.6/jessie/slim/Dockerfile | 170 ---------------- 3.6/stretch/Dockerfile | 133 ------------- 3.6/stretch/slim/Dockerfile | 181 ----------------- 3.7/buster/Dockerfile | 134 ------------- 3.7/buster/slim/Dockerfile | 182 ------------------ 3.7/stretch/Dockerfile | 134 ------------- 3.7/stretch/slim/Dockerfile | 182 ------------------ 3.7/windows/windowsservercore-1809/Dockerfile | 75 -------- .../windowsservercore-ltsc2016/Dockerfile | 75 -------- 3.8/buster/Dockerfile | 98 ---------- 3.8/buster/slim/Dockerfile | 146 -------------- 3.8/windows/windowsservercore-1809/Dockerfile | 75 -------- .../windowsservercore-ltsc2016/Dockerfile | 75 -------- 3.9/buster/Dockerfile | 97 ---------- 3.9/buster/slim/Dockerfile | 146 -------------- 3.9/windows/windowsservercore-1809/Dockerfile | 75 -------- .../windowsservercore-ltsc2016/Dockerfile | 75 -------- Dockerfile-debian.template | 128 ------------ Dockerfile-slim.template | 177 ----------------- Dockerfile-windowsservercore.template | 69 ------- LICENSE | 1 + 28 files changed, 1 insertion(+), 3260 deletions(-) delete mode 100644 3.10-rc/buster/Dockerfile delete mode 100644 3.10-rc/buster/slim/Dockerfile delete mode 100644 3.10-rc/windows/windowsservercore-1809/Dockerfile delete mode 100644 3.10-rc/windows/windowsservercore-ltsc2016/Dockerfile delete mode 100644 3.6/buster/Dockerfile delete mode 100644 3.6/buster/slim/Dockerfile delete mode 100644 3.6/jessie/Dockerfile delete mode 100644 3.6/jessie/slim/Dockerfile delete mode 100644 3.6/stretch/Dockerfile delete mode 100644 3.6/stretch/slim/Dockerfile delete mode 100644 3.7/buster/Dockerfile delete mode 100644 3.7/buster/slim/Dockerfile delete mode 100644 3.7/stretch/Dockerfile delete mode 100644 3.7/stretch/slim/Dockerfile delete mode 100644 3.7/windows/windowsservercore-1809/Dockerfile delete mode 100644 3.7/windows/windowsservercore-ltsc2016/Dockerfile delete mode 100644 3.8/buster/Dockerfile delete mode 100644 3.8/buster/slim/Dockerfile delete mode 100644 3.8/windows/windowsservercore-1809/Dockerfile delete mode 100644 3.8/windows/windowsservercore-ltsc2016/Dockerfile delete mode 100644 3.9/buster/Dockerfile delete mode 100644 3.9/buster/slim/Dockerfile delete mode 100644 3.9/windows/windowsservercore-1809/Dockerfile delete mode 100644 3.9/windows/windowsservercore-ltsc2016/Dockerfile delete mode 100644 Dockerfile-debian.template delete mode 100644 Dockerfile-slim.template delete mode 100644 Dockerfile-windowsservercore.template diff --git a/3.10-rc/buster/Dockerfile b/3.10-rc/buster/Dockerfile deleted file mode 100644 index 51aa16cc1..000000000 --- a/3.10-rc/buster/Dockerfile +++ /dev/null @@ -1,97 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:buster - -# 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 - -# 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.0a2 - -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 --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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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-rc/buster/slim/Dockerfile b/3.10-rc/buster/slim/Dockerfile deleted file mode 100644 index abb692b1d..000000000 --- a/3.10-rc/buster/slim/Dockerfile +++ /dev/null @@ -1,146 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:buster-slim - -# 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 - -# runtime dependencies -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - netbase \ - tzdata \ - ; \ - rm -rf /var/lib/apt/lists/* - -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.10.0a2 - -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)" \ - && 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 \ - \ - && 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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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/windows/windowsservercore-1809/Dockerfile b/3.10-rc/windows/windowsservercore-1809/Dockerfile deleted file mode 100644 index e144ba861..000000000 --- a/3.10-rc/windows/windowsservercore-1809/Dockerfile +++ /dev/null @@ -1,75 +0,0 @@ -# -# 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';"] - -# https://github.com/docker-library/python/pull/557 -ENV PYTHONIOENCODING UTF-8 - -ENV PYTHON_VERSION 3.10.0a2 -ENV PYTHON_RELEASE 3.10.0 - -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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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.10-rc/windows/windowsservercore-ltsc2016/Dockerfile b/3.10-rc/windows/windowsservercore-ltsc2016/Dockerfile deleted file mode 100644 index 122d55bd6..000000000 --- a/3.10-rc/windows/windowsservercore-ltsc2016/Dockerfile +++ /dev/null @@ -1,75 +0,0 @@ -# -# 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';"] - -# https://github.com/docker-library/python/pull/557 -ENV PYTHONIOENCODING UTF-8 - -ENV PYTHON_VERSION 3.10.0a2 -ENV PYTHON_RELEASE 3.10.0 - -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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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/buster/Dockerfile b/3.6/buster/Dockerfile deleted file mode 100644 index 482fbb751..000000000 --- a/3.6/buster/Dockerfile +++ /dev/null @@ -1,133 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:buster - -# 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 - -# extra dependencies (over what buildpack-deps already includes) -RUN apt-get update && apt-get install -y --no-install-recommends \ - libbluetooth-dev \ - tk-dev \ - && rm -rf /var/lib/apt/lists/* - -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.12 - -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 --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)" \ -# 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 '{}' + \ - \ - && 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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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.6/buster/slim/Dockerfile b/3.6/buster/slim/Dockerfile deleted file mode 100644 index b42478667..000000000 --- a/3.6/buster/slim/Dockerfile +++ /dev/null @@ -1,181 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:buster-slim - -# 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 - -# runtime dependencies -RUN set -eux; \ - 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 - -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 \ - 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)" \ - && 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 \ - \ - && 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" \ -# 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 '{}' + \ - \ - && 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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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.6/jessie/Dockerfile deleted file mode 100644 index 1055f2fd5..000000000 --- a/3.6/jessie/Dockerfile +++ /dev/null @@ -1,126 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:jessie - -# 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 - -# extra dependencies (over what buildpack-deps already includes) -RUN apt-get update && apt-get install -y --no-install-recommends \ - tk-dev \ - && rm -rf /var/lib/apt/lists/* - -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.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 --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-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 \ - \ - && 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 -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 19.1.1 - -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 -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/slim/Dockerfile b/3.6/jessie/slim/Dockerfile deleted file mode 100644 index 62d9646f7..000000000 --- a/3.6/jessie/slim/Dockerfile +++ /dev/null @@ -1,170 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:jessie-slim - -# 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 - -# 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 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.9 - -RUN set -ex \ - \ - && savedAptMark="$(apt-mark showmanual)" \ - && apt-get update && apt-get install -y --no-install-recommends \ - dpkg-dev \ - gcc \ - libbz2-dev \ - libc6-dev \ - libexpat1-dev \ - libffi-dev \ - libgdbm-dev \ - liblzma-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)" \ - && 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 \ - \ - && cd /usr/src/python \ - && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ - && ./configure \ - --build="$gnuArch" \ - --enable-loadable-sqlite-extensions \ - --enable-optimizations \ - --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 \ - \ - && 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 -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 -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 19.1.1 - -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 -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/stretch/Dockerfile b/3.6/stretch/Dockerfile deleted file mode 100644 index dab428ea0..000000000 --- a/3.6/stretch/Dockerfile +++ /dev/null @@ -1,133 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:stretch - -# 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 - -# extra dependencies (over what buildpack-deps already includes) -RUN apt-get update && apt-get install -y --no-install-recommends \ - libbluetooth-dev \ - tk-dev \ - && rm -rf /var/lib/apt/lists/* - -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.12 - -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 --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)" \ -# 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 '{}' + \ - \ - && 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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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.6/stretch/slim/Dockerfile b/3.6/stretch/slim/Dockerfile deleted file mode 100644 index bf6392f2c..000000000 --- a/3.6/stretch/slim/Dockerfile +++ /dev/null @@ -1,181 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:stretch-slim - -# 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 - -# runtime dependencies -RUN set -eux; \ - 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 - -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 \ - 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)" \ - && 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 \ - \ - && 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" \ -# 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 '{}' + \ - \ - && 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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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.7/buster/Dockerfile b/3.7/buster/Dockerfile deleted file mode 100644 index e87e3494c..000000000 --- a/3.7/buster/Dockerfile +++ /dev/null @@ -1,134 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:buster - -# 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 - -# 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.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" \ - && 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)" \ -# 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 '{}' + \ - \ - && 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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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.7/buster/slim/Dockerfile b/3.7/buster/slim/Dockerfile deleted file mode 100644 index b04dab717..000000000 --- a/3.7/buster/slim/Dockerfile +++ /dev/null @@ -1,182 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:buster-slim - -# 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 - -# runtime dependencies -RUN set -eux; \ - 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 - -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)" \ - && 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 \ - \ - && 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" \ -# 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 '{}' + \ - \ - && 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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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.7/stretch/Dockerfile b/3.7/stretch/Dockerfile deleted file mode 100644 index f93f71716..000000000 --- a/3.7/stretch/Dockerfile +++ /dev/null @@ -1,134 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:stretch - -# 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 - -# 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.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" \ - && 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)" \ -# 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 '{}' + \ - \ - && 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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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.7/stretch/slim/Dockerfile b/3.7/stretch/slim/Dockerfile deleted file mode 100644 index 37c889abf..000000000 --- a/3.7/stretch/slim/Dockerfile +++ /dev/null @@ -1,182 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:stretch-slim - -# 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 - -# runtime dependencies -RUN set -eux; \ - 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 - -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)" \ - && 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 \ - \ - && 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" \ -# 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 '{}' + \ - \ - && 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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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.7/windows/windowsservercore-1809/Dockerfile b/3.7/windows/windowsservercore-1809/Dockerfile deleted file mode 100644 index fd5cd9a2a..000000000 --- a/3.7/windows/windowsservercore-1809/Dockerfile +++ /dev/null @@ -1,75 +0,0 @@ -# -# 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';"] - -# https://github.com/docker-library/python/pull/557 -ENV PYTHONIOENCODING UTF-8 - -ENV PYTHON_VERSION 3.7.9 -ENV PYTHON_RELEASE 3.7.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); \ - [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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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.7/windows/windowsservercore-ltsc2016/Dockerfile b/3.7/windows/windowsservercore-ltsc2016/Dockerfile deleted file mode 100644 index 6ba337258..000000000 --- a/3.7/windows/windowsservercore-ltsc2016/Dockerfile +++ /dev/null @@ -1,75 +0,0 @@ -# -# 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';"] - -# https://github.com/docker-library/python/pull/557 -ENV PYTHONIOENCODING UTF-8 - -ENV PYTHON_VERSION 3.7.9 -ENV PYTHON_RELEASE 3.7.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); \ - [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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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.8/buster/Dockerfile b/3.8/buster/Dockerfile deleted file mode 100644 index 75072d2a7..000000000 --- a/3.8/buster/Dockerfile +++ /dev/null @@ -1,98 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:buster - -# 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 - -# 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.8.6 - -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 --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' \) \) \ - -o \( -type f -a -name 'wininst-*.exe' \) \ - \) -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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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.8/buster/slim/Dockerfile b/3.8/buster/slim/Dockerfile deleted file mode 100644 index 062e89ae9..000000000 --- a/3.8/buster/slim/Dockerfile +++ /dev/null @@ -1,146 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:buster-slim - -# 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 - -# runtime dependencies -RUN set -eux; \ - 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.8.6 - -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)" \ - && 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 \ - \ - && 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' \) \) \ - -o \( -type f -a -name 'wininst-*.exe' \) \ - \) -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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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.8/windows/windowsservercore-1809/Dockerfile b/3.8/windows/windowsservercore-1809/Dockerfile deleted file mode 100644 index f3fa4383f..000000000 --- a/3.8/windows/windowsservercore-1809/Dockerfile +++ /dev/null @@ -1,75 +0,0 @@ -# -# 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';"] - -# https://github.com/docker-library/python/pull/557 -ENV PYTHONIOENCODING UTF-8 - -ENV PYTHON_VERSION 3.8.6 -ENV PYTHON_RELEASE 3.8.6 - -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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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.8/windows/windowsservercore-ltsc2016/Dockerfile b/3.8/windows/windowsservercore-ltsc2016/Dockerfile deleted file mode 100644 index fc04df7fe..000000000 --- a/3.8/windows/windowsservercore-ltsc2016/Dockerfile +++ /dev/null @@ -1,75 +0,0 @@ -# -# 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';"] - -# https://github.com/docker-library/python/pull/557 -ENV PYTHONIOENCODING UTF-8 - -ENV PYTHON_VERSION 3.8.6 -ENV PYTHON_RELEASE 3.8.6 - -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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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.9/buster/Dockerfile b/3.9/buster/Dockerfile deleted file mode 100644 index 8315986fb..000000000 --- a/3.9/buster/Dockerfile +++ /dev/null @@ -1,97 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:buster - -# 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 - -# 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.0 - -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 --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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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/buster/slim/Dockerfile b/3.9/buster/slim/Dockerfile deleted file mode 100644 index 174606cb5..000000000 --- a/3.9/buster/slim/Dockerfile +++ /dev/null @@ -1,146 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:buster-slim - -# 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 - -# runtime dependencies -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - netbase \ - tzdata \ - ; \ - rm -rf /var/lib/apt/lists/* - -ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.9.0 - -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)" \ - && 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 \ - \ - && 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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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/windows/windowsservercore-1809/Dockerfile b/3.9/windows/windowsservercore-1809/Dockerfile deleted file mode 100644 index 96292e1c6..000000000 --- a/3.9/windows/windowsservercore-1809/Dockerfile +++ /dev/null @@ -1,75 +0,0 @@ -# -# 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';"] - -# https://github.com/docker-library/python/pull/557 -ENV PYTHONIOENCODING UTF-8 - -ENV PYTHON_VERSION 3.9.0 -ENV PYTHON_RELEASE 3.9.0 - -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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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.9/windows/windowsservercore-ltsc2016/Dockerfile b/3.9/windows/windowsservercore-ltsc2016/Dockerfile deleted file mode 100644 index 6cb7aba68..000000000 --- a/3.9/windows/windowsservercore-ltsc2016/Dockerfile +++ /dev/null @@ -1,75 +0,0 @@ -# -# 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';"] - -# https://github.com/docker-library/python/pull/557 -ENV PYTHONIOENCODING UTF-8 - -ENV PYTHON_VERSION 3.9.0 -ENV PYTHON_RELEASE 3.9.0 - -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 20.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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/Dockerfile-debian.template b/Dockerfile-debian.template deleted file mode 100644 index 6f0b37388..000000000 --- a/Dockerfile-debian.template +++ /dev/null @@ -1,128 +0,0 @@ -FROM 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 - -# 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 %%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" \ - && 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)" \ -# 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 '{}' + \ - \ - && 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 %%PLACEHOLDER%% -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL %%PLACEHOLDER%% -ENV PYTHON_GET_PIP_SHA256 %%PLACEHOLDER%% - -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/Dockerfile-slim.template b/Dockerfile-slim.template deleted file mode 100644 index 81b19ede0..000000000 --- a/Dockerfile-slim.template +++ /dev/null @@ -1,177 +0,0 @@ -FROM debian:%%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 - -# runtime dependencies -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - netbase \ - tzdata \ - ; \ - rm -rf /var/lib/apt/lists/* - -ENV GPG_KEY %%PLACEHOLDER%% -ENV PYTHON_VERSION %%PLACEHOLDER%% - -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)" \ - && 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 \ - \ - && 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" \ -# 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 '{}' + \ - \ - && 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 %%PLACEHOLDER%% -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL %%PLACEHOLDER%% -ENV PYTHON_GET_PIP_SHA256 %%PLACEHOLDER%% - -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/Dockerfile-windowsservercore.template b/Dockerfile-windowsservercore.template deleted file mode 100644 index 040a6ed32..000000000 --- a/Dockerfile-windowsservercore.template +++ /dev/null @@ -1,69 +0,0 @@ -FROM mcr.microsoft.com/windows/servercore:%%PLACEHOLDER%% - -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -# https://github.com/docker-library/python/pull/557 -ENV PYTHONIOENCODING UTF-8 - -ENV PYTHON_VERSION %%PLACEHOLDER%% -ENV PYTHON_RELEASE %%PLACEHOLDER%% - -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 %%PLACEHOLDER%% -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL %%PLACEHOLDER%% -ENV PYTHON_GET_PIP_SHA256 %%PLACEHOLDER%% - -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/LICENSE b/LICENSE index fbab368db..c4d81e946 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,5 @@ Copyright (c) 2014 Docker, Inc. +Copyright (c) 2020 Daniel Schulz, PhD Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the From c861ecb805f0301433efc4a18094e4834767baf6 Mon Sep 17 00:00:00 2001 From: Daniel Schulz Date: Sun, 20 Dec 2020 20:20:20 +0100 Subject: [PATCH 02/19] got back to latest versions of any CPython release strem; TODO: DRY for Docker images w/ CPython version and PIP version being configuration ARGs on build time --- 3.6/alpine3.11/Dockerfile | 176 ------------------------------------- 3.7/alpine3.11/Dockerfile | 177 -------------------------------------- ds-alpine/Dockerfile | 0 3 files changed, 353 deletions(-) delete mode 100644 3.6/alpine3.11/Dockerfile delete mode 100644 3.7/alpine3.11/Dockerfile create mode 100644 ds-alpine/Dockerfile diff --git a/3.6/alpine3.11/Dockerfile b/3.6/alpine3.11/Dockerfile deleted file mode 100644 index 295ea1d10..000000000 --- a/3.6/alpine3.11/Dockerfile +++ /dev/null @@ -1,176 +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 - -# runtime dependencies -RUN set -eux; \ - apk add --no-cache \ -# install ca-certificates so that HTTPS works consistently - ca-certificates \ - ; -# other runtime dependencies for Python are installed later - -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.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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 78ec108d3..000000000 --- a/3.7/alpine3.11/Dockerfile +++ /dev/null @@ -1,177 +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 - -# runtime dependencies -RUN set -eux; \ - apk add --no-cache \ -# install ca-certificates so that HTTPS works consistently - ca-certificates \ - ; -# other runtime dependencies for Python are installed later - -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.3.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 - -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/ds-alpine/Dockerfile b/ds-alpine/Dockerfile new file mode 100644 index 000000000..e69de29bb From a529ce99cafef28a6e5e3009597d61b3006e0f99 Mon Sep 17 00:00:00 2001 From: Daniel Schulz Date: Mon, 21 Dec 2020 20:20:20 +0100 Subject: [PATCH 03/19] got back to latest versions of any CPython release strem; TODO: DRY for Docker images w/ CPython version and PIP version being configuration ARGs on build time --- 3.10-rc/alpine3.12/Dockerfile | 53 ++++++++++---------- 3.6/alpine3.12/Dockerfile | 93 +++++++++++------------------------ 3.7/alpine3.12/Dockerfile | 92 +++++++++++----------------------- 3.8/alpine3.11/Dockerfile | 56 +++++++++++---------- ds-alpine/Dockerfile | 14 ++++++ 5 files changed, 129 insertions(+), 179 deletions(-) diff --git a/3.10-rc/alpine3.12/Dockerfile b/3.10-rc/alpine3.12/Dockerfile index b29f79b16..d1eab7543 100644 --- a/3.10-rc/alpine3.12/Dockerfile +++ b/3.10-rc/alpine3.12/Dockerfile @@ -1,13 +1,12 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# -FROM alpine:3.12 +FROM danielschulz/alpine:v3.12 +MAINTAINER Daniel Schulz +LABEL VISION="'We are stubborn on vision. We are flexible on details. We don’t give up on things easily.' (Jeff Bezos)" \ + AGILE_MANIFESTO="https://agilemanifesto.org" \ + SWE_MANIFESTO="https://manifesto.softwarecraftsmanship.org" # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +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. @@ -23,26 +22,28 @@ RUN set -eux; \ ; # other runtime dependencies for Python are installed later -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.10.0a2 +# use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) +ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" +ARG CPYTHON_GIT_REFERENCE="v3.10.0a3" +ARG PYTHON_VERSION="${CPYTHON_GIT_REFERENCE}" + +ENV PYTHON_VERSION=${PYTHON_VERSION} RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ gnupg \ tar \ xz \ + git \ \ - && 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 \ - \ + && time git clone \ + -b ${CPYTHON_GIT_REFERENCE} \ + --depth 1 \ + --single-branch \ + --recurse-submodules ${CPYTHON_GIT_URI} \ + /usr/src/python \ + && rm -rf /usr/src/python/.git \ && apk add --no-cache --virtual .build-deps \ bluez-dev \ bzip2-dev \ @@ -75,7 +76,7 @@ RUN set -ex \ && cd /usr/src/python \ && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ - --build="$gnuArch" \ + --build="${gnuArch}" \ --enable-loadable-sqlite-extensions \ --enable-optimizations \ --enable-option-checking=fatal \ @@ -114,20 +115,20 @@ 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.3.1 +ENV PYTHON_PIP_VERSION 20.3.3 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 +ENV PYTHON_GET_PIP_URL https://raw.githubusercontent.com/pypa/get-pip/${PYTHON_PIP_VERSION}/get-pip.py +ENV PYTHON_GET_PIP_SHA256 6a0b13826862f33c13b614a921d36253bfa1ae779c5fbf569876f3585057e9d2 RUN set -ex; \ \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ + wget -q -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==${PYTHON_PIP_VERSION}" \ ; \ pip --version; \ \ diff --git a/3.6/alpine3.12/Dockerfile b/3.6/alpine3.12/Dockerfile index 81a30ad79..1eb997705 100644 --- a/3.6/alpine3.12/Dockerfile +++ b/3.6/alpine3.12/Dockerfile @@ -1,13 +1,12 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# -FROM alpine:3.12 +FROM danielschulz/alpine:v3.12 +MAINTAINER Daniel Schulz +LABEL VISION="'We are stubborn on vision. We are flexible on details. We don’t give up on things easily.' (Jeff Bezos)" \ + AGILE_MANIFESTO="https://agilemanifesto.org" \ + SWE_MANIFESTO="https://manifesto.softwarecraftsmanship.org" # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +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. @@ -18,29 +17,33 @@ RUN set -eux; \ apk add --no-cache \ # install ca-certificates so that HTTPS works consistently ca-certificates \ +# and tzdata for PEP 615 (https://www.python.org/dev/peps/pep-0615/) + tzdata \ ; # other runtime dependencies for Python are installed later -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.12 +# use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) +ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" +ARG CPYTHON_GIT_REFERENCE="v3.6.12" +ARG PYTHON_VERSION="${CPYTHON_GIT_REFERENCE}" + +ENV PYTHON_VERSION=${PYTHON_VERSION} RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ gnupg \ tar \ xz \ + git \ \ - && 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 \ - \ + && time git clone \ + -b ${CPYTHON_GIT_REFERENCE} \ + --depth 1 \ + --single-branch \ + --recurse-submodules ${CPYTHON_GIT_URI} \ + /usr/src/python \ + && rm -rf /usr/src/python/.git \ && apk add --no-cache --virtual .build-deps \ bluez-dev \ bzip2-dev \ @@ -64,6 +67,7 @@ RUN set -ex \ tcl-dev \ tk \ tk-dev \ + util-linux-dev \ xz-dev \ zlib-dev \ # add build deps before removing fetch deps in case there's overlap @@ -72,7 +76,7 @@ RUN set -ex \ && cd /usr/src/python \ && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ - --build="$gnuArch" \ + --build="${gnuArch}" \ --enable-loadable-sqlite-extensions \ --enable-optimizations \ --enable-option-checking=fatal \ @@ -85,42 +89,6 @@ RUN set -ex \ # 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 \ \ @@ -128,7 +96,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' '{}' ';' \ @@ -148,20 +115,20 @@ 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.3.1 +ENV PYTHON_PIP_VERSION 20.3.3 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 +ENV PYTHON_GET_PIP_URL https://raw.githubusercontent.com/pypa/get-pip/${PYTHON_PIP_VERSION}/get-pip.py +ENV PYTHON_GET_PIP_SHA256 6a0b13826862f33c13b614a921d36253bfa1ae779c5fbf569876f3585057e9d2 RUN set -ex; \ \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ + wget -q -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==${PYTHON_PIP_VERSION}" \ ; \ pip --version; \ \ diff --git a/3.7/alpine3.12/Dockerfile b/3.7/alpine3.12/Dockerfile index e443ab29f..1060cac8b 100644 --- a/3.7/alpine3.12/Dockerfile +++ b/3.7/alpine3.12/Dockerfile @@ -1,13 +1,12 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# -FROM alpine:3.12 +FROM danielschulz/alpine:v3.12 +MAINTAINER Daniel Schulz +LABEL VISION="'We are stubborn on vision. We are flexible on details. We don’t give up on things easily.' (Jeff Bezos)" \ + AGILE_MANIFESTO="https://agilemanifesto.org" \ + SWE_MANIFESTO="https://manifesto.softwarecraftsmanship.org" # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +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. @@ -18,29 +17,33 @@ RUN set -eux; \ apk add --no-cache \ # install ca-certificates so that HTTPS works consistently ca-certificates \ +# and tzdata for PEP 615 (https://www.python.org/dev/peps/pep-0615/) + tzdata \ ; # other runtime dependencies for Python are installed later -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.7.9 +# use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) +ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" +ARG CPYTHON_GIT_REFERENCE="v3.7.9" +ARG PYTHON_VERSION="${CPYTHON_GIT_REFERENCE}" + +ENV PYTHON_VERSION=${PYTHON_VERSION} RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ gnupg \ tar \ xz \ + git \ \ - && 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 \ - \ + && time git clone \ + -b ${CPYTHON_GIT_REFERENCE} \ + --depth 1 \ + --single-branch \ + --recurse-submodules ${CPYTHON_GIT_URI} \ + /usr/src/python \ + && rm -rf /usr/src/python/.git \ && apk add --no-cache --virtual .build-deps \ bluez-dev \ bzip2-dev \ @@ -73,7 +76,7 @@ RUN set -ex \ && cd /usr/src/python \ && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ - --build="$gnuArch" \ + --build="${gnuArch}" \ --enable-loadable-sqlite-extensions \ --enable-optimizations \ --enable-option-checking=fatal \ @@ -86,42 +89,6 @@ RUN set -ex \ # 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 \ \ @@ -129,7 +96,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' '{}' ';' \ @@ -149,20 +115,20 @@ 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.3.1 +ENV PYTHON_PIP_VERSION 20.3.3 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 +ENV PYTHON_GET_PIP_URL https://raw.githubusercontent.com/pypa/get-pip/${PYTHON_PIP_VERSION}/get-pip.py +ENV PYTHON_GET_PIP_SHA256 6a0b13826862f33c13b614a921d36253bfa1ae779c5fbf569876f3585057e9d2 RUN set -ex; \ \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ + wget -q -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==${PYTHON_PIP_VERSION}" \ ; \ pip --version; \ \ diff --git a/3.8/alpine3.11/Dockerfile b/3.8/alpine3.11/Dockerfile index 8f01221d9..552eace9f 100644 --- a/3.8/alpine3.11/Dockerfile +++ b/3.8/alpine3.11/Dockerfile @@ -1,13 +1,12 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# -FROM alpine:3.11 +FROM danielschulz/alpine:v3.12 +MAINTAINER Daniel Schulz +LABEL VISION="'We are stubborn on vision. We are flexible on details. We don’t give up on things easily.' (Jeff Bezos)" \ + AGILE_MANIFESTO="https://agilemanifesto.org" \ + SWE_MANIFESTO="https://manifesto.softwarecraftsmanship.org" # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +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. @@ -18,29 +17,33 @@ RUN set -eux; \ apk add --no-cache \ # install ca-certificates so that HTTPS works consistently ca-certificates \ +# and tzdata for PEP 615 (https://www.python.org/dev/peps/pep-0615/) + tzdata \ ; # other runtime dependencies for Python are installed later -ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.8.6 +# use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) +ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" +ARG CPYTHON_GIT_REFERENCE="v3.8.6" +ARG PYTHON_VERSION="${CPYTHON_GIT_REFERENCE}" + +ENV PYTHON_VERSION=${PYTHON_VERSION} RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ gnupg \ tar \ xz \ + git \ \ - && 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 \ - \ + && time git clone \ + -b ${CPYTHON_GIT_REFERENCE} \ + --depth 1 \ + --single-branch \ + --recurse-submodules ${CPYTHON_GIT_URI} \ + /usr/src/python \ + && rm -rf /usr/src/python/.git \ && apk add --no-cache --virtual .build-deps \ bluez-dev \ bzip2-dev \ @@ -73,7 +76,7 @@ RUN set -ex \ && cd /usr/src/python \ && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ - --build="$gnuArch" \ + --build="${gnuArch}" \ --enable-loadable-sqlite-extensions \ --enable-optimizations \ --enable-option-checking=fatal \ @@ -93,7 +96,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' '{}' ';' \ @@ -113,20 +115,20 @@ 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.3.1 +ENV PYTHON_PIP_VERSION 20.3.3 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 +ENV PYTHON_GET_PIP_URL https://raw.githubusercontent.com/pypa/get-pip/${PYTHON_PIP_VERSION}/get-pip.py +ENV PYTHON_GET_PIP_SHA256 6a0b13826862f33c13b614a921d36253bfa1ae779c5fbf569876f3585057e9d2 RUN set -ex; \ \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ + wget -q -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==${PYTHON_PIP_VERSION}" \ ; \ pip --version; \ \ diff --git a/ds-alpine/Dockerfile b/ds-alpine/Dockerfile index e69de29bb..c5144e050 100644 --- a/ds-alpine/Dockerfile +++ b/ds-alpine/Dockerfile @@ -0,0 +1,14 @@ +FROM alpine:3.12 +MAINTAINER Daniel Schulz + +LABEL SUSTAINABLE_CULTURE="https://sloanreview.mit.edu/culture500/" \ + CULTURE_EATS_STRATEGY="Unearthing the Roots of Corporate Social Irresponsibiity (https://www.zinio.com/de/reader/readsvg/447758/56)" \ + TEAM_GOALS="https://www.strategy-business.com/blog/Stretch-or-safe-The-art-of-setting-goals-for-your-teams?gko=4d547" \ + STRATEGIC_LEADERSHIP_PRINCIPLES="https://www.strategy-business.com/article/10-Principles-of-Strategic-Leadership" \ + LAZY_LEADERS_HEROIC_MANAGERS="https://www.strategy-business.com/article/Lazy-leaders-and-heroic-managers" \ + ROOTS_IRRESPONSIBLE_BEHAVIOUR="The Roots of Corporate Socail Irresponsible Behaviour is Unrealistic Performance Expectations, a Pressure-Cooker Culture and Stress (https://www.zinio.com/de/reader/readsvg/447758/56)" + +RUN apk update && \ + apk add --no-cache nmap nmap-scripts nmap-nselibs curl wget bind-tools + +CMD [ "sh" ] From 80f9059f04b93592ee168f38af3884fbac33013a Mon Sep 17 00:00:00 2001 From: Daniel Schulz Date: Sun, 20 Dec 2020 20:20:21 +0100 Subject: [PATCH 04/19] got back to latest versions of any CPython release strem; TODO: DRY for Docker images w/ CPython version and PIP version being configuration ARGs on build time --- 3.9/alpine3.12/Dockerfile | 53 ++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/3.9/alpine3.12/Dockerfile b/3.9/alpine3.12/Dockerfile index c16e0971a..2e62c8924 100644 --- a/3.9/alpine3.12/Dockerfile +++ b/3.9/alpine3.12/Dockerfile @@ -1,13 +1,12 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# -FROM alpine:3.12 +FROM danielschulz/alpine:v3.12 +MAINTAINER Daniel Schulz +LABEL VISION="'We are stubborn on vision. We are flexible on details. We don’t give up on things easily.' (Jeff Bezos)" \ + AGILE_MANIFESTO="https://agilemanifesto.org" \ + SWE_MANIFESTO="https://manifesto.softwarecraftsmanship.org" # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +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. @@ -23,26 +22,28 @@ RUN set -eux; \ ; # other runtime dependencies for Python are installed later -ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.9.0 +# use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) +ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" +ARG CPYTHON_GIT_REFERENCE="v3.9.1" +ARG PYTHON_VERSION="${CPYTHON_GIT_REFERENCE}" + +ENV PYTHON_VERSION=${PYTHON_VERSION} RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ gnupg \ tar \ xz \ + git \ \ - && 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 \ - \ + && time git clone \ + -b ${CPYTHON_GIT_REFERENCE} \ + --depth 1 \ + --single-branch \ + --recurse-submodules ${CPYTHON_GIT_URI} \ + /usr/src/python \ + && rm -rf /usr/src/python/.git \ && apk add --no-cache --virtual .build-deps \ bluez-dev \ bzip2-dev \ @@ -75,7 +76,7 @@ RUN set -ex \ && cd /usr/src/python \ && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ - --build="$gnuArch" \ + --build="${gnuArch}" \ --enable-loadable-sqlite-extensions \ --enable-optimizations \ --enable-option-checking=fatal \ @@ -114,20 +115,20 @@ 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.3.1 +ENV PYTHON_PIP_VERSION 20.3.3 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 +ENV PYTHON_GET_PIP_URL https://raw.githubusercontent.com/pypa/get-pip/${PYTHON_PIP_VERSION}/get-pip.py +ENV PYTHON_GET_PIP_SHA256 6a0b13826862f33c13b614a921d36253bfa1ae779c5fbf569876f3585057e9d2 RUN set -ex; \ \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ + wget -q -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==${PYTHON_PIP_VERSION}" \ ; \ pip --version; \ \ From 196e7d8424a114291fe05333ded1960ec3e1ca2c Mon Sep 17 00:00:00 2001 From: Daniel Schulz Date: Sun, 20 Dec 2020 21:00:12 +0100 Subject: [PATCH 05/19] improved ds-alpine base image; reduced labels in Python docker images thereafter --- 3.10-rc/alpine3.12/Dockerfile | 3 --- 3.6/alpine3.12/Dockerfile | 3 --- 3.7/alpine3.12/Dockerfile | 3 --- 3.8/alpine3.11/Dockerfile | 3 --- 3.9/alpine3.12/Dockerfile | 3 --- ds-alpine/Dockerfile | 20 +++++++++++++++++--- 6 files changed, 17 insertions(+), 18 deletions(-) diff --git a/3.10-rc/alpine3.12/Dockerfile b/3.10-rc/alpine3.12/Dockerfile index d1eab7543..72f62319d 100644 --- a/3.10-rc/alpine3.12/Dockerfile +++ b/3.10-rc/alpine3.12/Dockerfile @@ -1,9 +1,6 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz -LABEL VISION="'We are stubborn on vision. We are flexible on details. We don’t give up on things easily.' (Jeff Bezos)" \ - AGILE_MANIFESTO="https://agilemanifesto.org" \ - SWE_MANIFESTO="https://manifesto.softwarecraftsmanship.org" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} diff --git a/3.6/alpine3.12/Dockerfile b/3.6/alpine3.12/Dockerfile index 1eb997705..71c49accc 100644 --- a/3.6/alpine3.12/Dockerfile +++ b/3.6/alpine3.12/Dockerfile @@ -1,9 +1,6 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz -LABEL VISION="'We are stubborn on vision. We are flexible on details. We don’t give up on things easily.' (Jeff Bezos)" \ - AGILE_MANIFESTO="https://agilemanifesto.org" \ - SWE_MANIFESTO="https://manifesto.softwarecraftsmanship.org" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} diff --git a/3.7/alpine3.12/Dockerfile b/3.7/alpine3.12/Dockerfile index 1060cac8b..7eaa8bf59 100644 --- a/3.7/alpine3.12/Dockerfile +++ b/3.7/alpine3.12/Dockerfile @@ -1,9 +1,6 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz -LABEL VISION="'We are stubborn on vision. We are flexible on details. We don’t give up on things easily.' (Jeff Bezos)" \ - AGILE_MANIFESTO="https://agilemanifesto.org" \ - SWE_MANIFESTO="https://manifesto.softwarecraftsmanship.org" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} diff --git a/3.8/alpine3.11/Dockerfile b/3.8/alpine3.11/Dockerfile index 552eace9f..768d1495b 100644 --- a/3.8/alpine3.11/Dockerfile +++ b/3.8/alpine3.11/Dockerfile @@ -1,9 +1,6 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz -LABEL VISION="'We are stubborn on vision. We are flexible on details. We don’t give up on things easily.' (Jeff Bezos)" \ - AGILE_MANIFESTO="https://agilemanifesto.org" \ - SWE_MANIFESTO="https://manifesto.softwarecraftsmanship.org" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} diff --git a/3.9/alpine3.12/Dockerfile b/3.9/alpine3.12/Dockerfile index 2e62c8924..6240d88cd 100644 --- a/3.9/alpine3.12/Dockerfile +++ b/3.9/alpine3.12/Dockerfile @@ -1,9 +1,6 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz -LABEL VISION="'We are stubborn on vision. We are flexible on details. We don’t give up on things easily.' (Jeff Bezos)" \ - AGILE_MANIFESTO="https://agilemanifesto.org" \ - SWE_MANIFESTO="https://manifesto.softwarecraftsmanship.org" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} diff --git a/ds-alpine/Dockerfile b/ds-alpine/Dockerfile index c5144e050..5fbf12690 100644 --- a/ds-alpine/Dockerfile +++ b/ds-alpine/Dockerfile @@ -6,9 +6,23 @@ LABEL SUSTAINABLE_CULTURE="https://sloanreview.mit.edu/culture500/" \ TEAM_GOALS="https://www.strategy-business.com/blog/Stretch-or-safe-The-art-of-setting-goals-for-your-teams?gko=4d547" \ STRATEGIC_LEADERSHIP_PRINCIPLES="https://www.strategy-business.com/article/10-Principles-of-Strategic-Leadership" \ LAZY_LEADERS_HEROIC_MANAGERS="https://www.strategy-business.com/article/Lazy-leaders-and-heroic-managers" \ - ROOTS_IRRESPONSIBLE_BEHAVIOUR="The Roots of Corporate Socail Irresponsible Behaviour is Unrealistic Performance Expectations, a Pressure-Cooker Culture and Stress (https://www.zinio.com/de/reader/readsvg/447758/56)" + ROOTS_IRRESPONSIBLE_BEHAVIOUR="The Roots of Corporate Socail Irresponsible Behaviour is Unrealistic Performance Expectations, a Pressure-Cooker Culture and Stress (https://www.zinio.com/de/reader/readsvg/447758/56)" \ + VISION="'We are stubborn on vision. We are flexible on details. We don’t give up on things easily.' (Jeff Bezos)" \ + AGILE_MANIFESTO="https://agilemanifesto.org" \ + SWE_MANIFESTO="https://manifesto.softwarecraftsmanship.org" \ + ROOTS_IRRESPONSIBLE_BEHAVIOUR="The Roots of Corporate Socail Irresponsible Behaviour is Unrealistic Performance Expectations, a Pressure-Cooker Culture and Stress (Rotman Magazine, Fall 2020, The Magazine of the Rotman School of Management, University of Toronto, https://www.zinio.com/de/reader/readsvg/447758/56)" \ + HBR_LEADING_BURNED_OUT="https://hbr.org/2020/12/how-to-lead-when-your-team-is-exhausted-and-you-are-too" \ + HBR_TRUST_CRISIS="https://hbr.org/2019/07/the-trust-crisis" \ + BCG_GETTING_MANAGERS_BACK_TO_WORK="https://www.bcg.com/de-de/publications/2018/bringing-managers-back-to-work" \ + MIT_HIDDEN_COSTS_DISHONESTY="https://sloanreview.mit.edu/article/the-hidden-costs-of-organizational-dishonesty/" \ + GOOGLE_RESEARCH_ML_IS_HIGHINTEREST_CREDIT_CARD="https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43146.pdf" \ + GOOGLE_HIDDEN_TECH_DEBT_IN_AI="https://papers.nips.cc/paper/2015/file/86df7dcfd896fcaf2674f757a2463eba-Paper.pdf" \ + AUTHOR_GITHUB="https://github.com/danielschulz" \ + AUTHOR_DOCKER_HUB="https://hub.docker.com/u/danielschulz" \ + AUTHOR_MEDIUM="https://medium.com/@danielschulz.it" \ + AUTHOR_WEBSITE="http://danielschulz.it" RUN apk update && \ - apk add --no-cache nmap nmap-scripts nmap-nselibs curl wget bind-tools + apk add --no-cache nmap nmap-scripts nmap-nselibs curl wget bind-tools bash -CMD [ "sh" ] +CMD [ "bash" ] From c9872c7ab0352e4aba8e7871ae2d158fc123aa7b Mon Sep 17 00:00:00 2001 From: Daniel Schulz Date: Sun, 20 Dec 2020 20:21:00 +0100 Subject: [PATCH 06/19] removed stale template file combination; got rid of alpine 3.11 and fixed ds-alpine as base image for ds-py:v3.8 --- 3.8/alpine3.11/Dockerfile | 140 ----------------------- 3.8/alpine3.12/Dockerfile | 53 +++++---- Dockerfile-alpine.template | 173 ----------------------------- generate-stackbrew-library.sh | 150 ------------------------- update.sh | 203 ---------------------------------- 5 files changed, 26 insertions(+), 693 deletions(-) delete mode 100644 3.8/alpine3.11/Dockerfile delete mode 100644 Dockerfile-alpine.template delete mode 100755 generate-stackbrew-library.sh delete mode 100755 update.sh diff --git a/3.8/alpine3.11/Dockerfile b/3.8/alpine3.11/Dockerfile deleted file mode 100644 index 768d1495b..000000000 --- a/3.8/alpine3.11/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ - -FROM danielschulz/alpine:v3.12 -MAINTAINER Daniel Schulz - -# 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 - -# runtime dependencies -RUN set -eux; \ - apk add --no-cache \ -# install ca-certificates so that HTTPS works consistently - ca-certificates \ -# and tzdata for PEP 615 (https://www.python.org/dev/peps/pep-0615/) - tzdata \ - ; -# other runtime dependencies for Python are installed later - -# use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) -ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="v3.8.6" -ARG PYTHON_VERSION="${CPYTHON_GIT_REFERENCE}" - -ENV PYTHON_VERSION=${PYTHON_VERSION} - -RUN set -ex \ - && apk add --no-cache --virtual .fetch-deps \ - gnupg \ - tar \ - xz \ - git \ - \ - && mkdir -p /usr/src/python \ - && time git clone \ - -b ${CPYTHON_GIT_REFERENCE} \ - --depth 1 \ - --single-branch \ - --recurse-submodules ${CPYTHON_GIT_URI} \ - /usr/src/python \ - && rm -rf /usr/src/python/.git \ - && 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" \ - && 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 '{}' + \ - \ - && 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.3.3 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://raw.githubusercontent.com/pypa/get-pip/${PYTHON_PIP_VERSION}/get-pip.py -ENV PYTHON_GET_PIP_SHA256 6a0b13826862f33c13b614a921d36253bfa1ae779c5fbf569876f3585057e9d2 - -RUN set -ex; \ - \ - wget -q -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.8/alpine3.12/Dockerfile b/3.8/alpine3.12/Dockerfile index 58b329fe5..768d1495b 100644 --- a/3.8/alpine3.12/Dockerfile +++ b/3.8/alpine3.12/Dockerfile @@ -1,13 +1,9 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# -FROM alpine:3.12 +FROM danielschulz/alpine:v3.12 +MAINTAINER Daniel Schulz # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +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. @@ -18,29 +14,33 @@ RUN set -eux; \ apk add --no-cache \ # install ca-certificates so that HTTPS works consistently ca-certificates \ +# and tzdata for PEP 615 (https://www.python.org/dev/peps/pep-0615/) + tzdata \ ; # other runtime dependencies for Python are installed later -ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.8.6 +# use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) +ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" +ARG CPYTHON_GIT_REFERENCE="v3.8.6" +ARG PYTHON_VERSION="${CPYTHON_GIT_REFERENCE}" + +ENV PYTHON_VERSION=${PYTHON_VERSION} RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ gnupg \ tar \ xz \ + git \ \ - && 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 \ - \ + && time git clone \ + -b ${CPYTHON_GIT_REFERENCE} \ + --depth 1 \ + --single-branch \ + --recurse-submodules ${CPYTHON_GIT_URI} \ + /usr/src/python \ + && rm -rf /usr/src/python/.git \ && apk add --no-cache --virtual .build-deps \ bluez-dev \ bzip2-dev \ @@ -73,7 +73,7 @@ RUN set -ex \ && cd /usr/src/python \ && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ - --build="$gnuArch" \ + --build="${gnuArch}" \ --enable-loadable-sqlite-extensions \ --enable-optimizations \ --enable-option-checking=fatal \ @@ -93,7 +93,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' '{}' ';' \ @@ -113,20 +112,20 @@ 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.3.1 +ENV PYTHON_PIP_VERSION 20.3.3 # https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 +ENV PYTHON_GET_PIP_URL https://raw.githubusercontent.com/pypa/get-pip/${PYTHON_PIP_VERSION}/get-pip.py +ENV PYTHON_GET_PIP_SHA256 6a0b13826862f33c13b614a921d36253bfa1ae779c5fbf569876f3585057e9d2 RUN set -ex; \ \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ + wget -q -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==${PYTHON_PIP_VERSION}" \ ; \ pip --version; \ \ diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template deleted file mode 100644 index 9caaa20d4..000000000 --- a/Dockerfile-alpine.template +++ /dev/null @@ -1,173 +0,0 @@ -FROM alpine:%%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 - -# runtime dependencies -RUN set -eux; \ - apk add --no-cache \ -# install ca-certificates so that HTTPS works consistently - ca-certificates \ -# and tzdata for PEP 615 (https://www.python.org/dev/peps/pep-0615/) - tzdata \ - ; -# other runtime dependencies for Python are installed later - -ENV GPG_KEY %%PLACEHOLDER%% -ENV PYTHON_VERSION %%PLACEHOLDER%% - -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 %%PLACEHOLDER%% -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL %%PLACEHOLDER%% -ENV PYTHON_GET_PIP_SHA256 %%PLACEHOLDER%% - -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/generate-stackbrew-library.sh b/generate-stackbrew-library.sh deleted file mode 100755 index 3ecbd925d..000000000 --- a/generate-stackbrew-library.sh +++ /dev/null @@ -1,150 +0,0 @@ -#!/usr/bin/env bash -set -Eeuo pipefail - -declare -A aliases=( - [3.10-rc]='rc' - [3.9]='3 latest' -) - -defaultDebianSuite='buster' # TODO buster -declare -A debianSuites=( - #[3.8-rc]='buster' -) -defaultAlpineVersion='3.12' - -self="$(basename "$BASH_SOURCE")" -cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" - -versions=( */ ) -versions=( "${versions[@]%/}" ) - -# sort version numbers with highest first -IFS=$'\n'; versions=( $(echo "${versions[*]}" | sort -rV) ); unset IFS - -# get the most recent commit which modified any of "$@" -fileCommit() { - git log -1 --format='format:%H' HEAD -- "$@" -} - -# get the most recent commit which modified "$1/Dockerfile" or any file COPY'd from "$1/Dockerfile" -dirCommit() { - local dir="$1"; shift - ( - cd "$dir" - fileCommit \ - Dockerfile \ - $(git show HEAD:./Dockerfile | awk ' - toupper($1) == "COPY" { - for (i = 2; i < NF; i++) { - print $i - } - } - ') - ) -} - -getArches() { - local repo="$1"; shift - local officialImagesUrl='https://github.com/docker-library/official-images/raw/master/library/' - - eval "declare -g -A parentRepoToArches=( $( - find -name 'Dockerfile' -exec awk ' - toupper($1) == "FROM" && $2 !~ /^('"$repo"'|scratch|.*\/.*)(:|$)/ { - print "'"$officialImagesUrl"'" $2 - } - ' '{}' + \ - | sort -u \ - | xargs bashbrew cat --format '[{{ .RepoName }}:{{ .TagName }}]="{{ join " " .TagEntry.Architectures }}"' - ) )" -} -getArches 'python' - -cat <<-EOH -# this file is generated via https://github.com/docker-library/python/blob/$(fileCommit "$self")/$self - -Maintainers: Tianon Gravi (@tianon), - Joseph Ferguson (@yosifkit) -GitRepo: https://github.com/docker-library/python.git -EOH - -# prints "$2$1$3$1...$N" -join() { - local sep="$1"; shift - local out; printf -v out "${sep//%/%%}%s" "$@" - echo "${out#$sep}" -} - -for version in "${versions[@]}"; do - rcVersion="${version%-rc}" - - for v in \ - {buster,stretch}{,/slim} \ - alpine{3.12,3.11} \ - windows/windowsservercore-{1809,ltsc2016} \ - ; do - dir="$version/$v" - variant="$(basename "$v")" - - if [ "$variant" = 'slim' ]; then - # convert "slim" into "slim-jessie" - # https://github.com/docker-library/ruby/pull/142#issuecomment-320012893 - variant="$variant-$(basename "$(dirname "$v")")" - fi - - [ -f "$dir/Dockerfile" ] || continue - - commit="$(dirCommit "$dir")" - - fullVersion="$(git show "$commit":"$dir/Dockerfile" | awk '$1 == "ENV" && $2 == "PYTHON_VERSION" { print $3; exit }')" - - versionAliases=( - $fullVersion - $version - ${aliases[$version]:-} - ) - - variantAliases=( "${versionAliases[@]/%/-$variant}" ) - debianSuite="${debianSuites[$version]:-$defaultDebianSuite}" - case "$variant" in - *-"$debianSuite") # "slim-stretch", etc need "slim" - variantAliases+=( "${versionAliases[@]/%/-${variant%-$debianSuite}}" ) - ;; - "alpine${defaultAlpineVersion}") - variantAliases+=( "${versionAliases[@]/%/-alpine}" ) - ;; - esac - variantAliases=( "${variantAliases[@]//latest-/}" ) - - case "$v" in - windows/*) variantArches='windows-amd64' ;; - *) - variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$dir/Dockerfile")" - variantArches="${parentRepoToArches[$variantParent]}" - ;; - esac - - sharedTags=() - for windowsShared in windowsservercore nanoserver; do - if [[ "$variant" == "$windowsShared"* ]]; then - sharedTags=( "${versionAliases[@]/%/-$windowsShared}" ) - sharedTags=( "${sharedTags[@]//latest-/}" ) - break - fi - done - if [ "$variant" = "$debianSuite" ] || [[ "$variant" == 'windowsservercore'* ]]; then - sharedTags+=( "${versionAliases[@]}" ) - fi - - echo - echo "Tags: $(join ', ' "${variantAliases[@]}")" - if [ "${#sharedTags[@]}" -gt 0 ]; then - echo "SharedTags: $(join ', ' "${sharedTags[@]}")" - fi - cat <<-EOE - Architectures: $(join ', ' $variantArches) - GitCommit: $commit - Directory: $dir - EOE - [[ "$v" == windows/* ]] && echo "Constraints: $variant" - done -done diff --git a/update.sh b/update.sh deleted file mode 100755 index 971764945..000000000 --- a/update.sh +++ /dev/null @@ -1,203 +0,0 @@ -#!/usr/bin/env bash -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 - - # gpg: key B26995E310250568: public key "\xc5\x81ukasz Langa (GPG langa.pl) " imported - [3.8]='E3FF2839C048B25C084DEBE9B26995E310250568' - # https://www.python.org/dev/peps/pep-0569/#release-manager-and-crew - - # gpg: key B26995E310250568: public key "\xc5\x81ukasz Langa (GPG langa.pl) " imported - [3.9]='E3FF2839C048B25C084DEBE9B26995E310250568' - # https://www.python.org/dev/peps/pep-0596/#release-manager-and-crew - - # gpg: key 64E628F8D684696D: public key "Pablo Galindo Salgado " imported - [3.10]='A035C8C19219BA821ECEA86B64E628F8D684696D' - # https://www.python.org/dev/peps/pep-0619/#release-manager-and-crew -) - -cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" - -versions=( "$@" ) -if [ ${#versions[@]} -eq 0 ]; then - versions=( */ ) -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" -getPipSha256="$(curl -fsSL "$getPipUrl" | sha256sum | cut -d' ' -f1)" - -generated_warning() { - cat <<-EOH - # - # NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" - # - # PLEASE DO NOT EDIT IT DIRECTLY. - # - - EOH -} - -is_good_version() { - local dir="$1"; shift - local dirVersion="$1"; shift - local fullVersion="$1"; shift - - if ! wget -q -O /dev/null -o /dev/null --spider "https://www.python.org/ftp/python/$dirVersion/Python-$fullVersion.tar.xz"; then - return 1 - fi - - if [ -d "$dir/windows" ] && ! wget -q -O /dev/null -o /dev/null --spider "https://www.python.org/ftp/python/$dirVersion/python-$fullVersion-amd64.exe"; then - return 1 - fi - - return 0 -} - -for version in "${versions[@]}"; do - rcVersion="${version%-rc}" - rcGrepV='-v' - if [ "$rcVersion" != "$version" ]; then - rcGrepV= - fi - - possibles=( $( - { - git ls-remote --tags https://github.com/python/cpython.git "refs/tags/v${rcVersion}.*" \ - | sed -r 's!^.*refs/tags/v([0-9a-z.]+).*$!\1!' \ - | grep $rcGrepV -E -- '[a-zA-Z]+' \ - || : - - # this page has a very aggressive varnish cache in front of it, which is why we also scrape tags from GitHub - curl -fsSL 'https://www.python.org/ftp/python/' \ - | grep '&2 - exit 1 - fi - - echo "$version: $fullVersion" - - for v in \ - alpine{3.11,3.12} \ - {stretch,buster}{/slim,} \ - windows/windowsservercore-{1809,ltsc2016} \ - ; do - dir="$version/$v" - variant="$(basename "$v")" - - [ -d "$dir" ] || continue - - case "$variant" in - slim) template="$variant"; tag="$(basename "$(dirname "$dir")")" ;; - windowsservercore-*) template='windowsservercore'; tag="${variant#*-}" ;; - alpine*) template='alpine'; tag="${variant#alpine}" ;; - *) template='debian'; tag="$variant" ;; - esac - if [ "$variant" = 'slim' ]; then - # use "debian:*-slim" variants for "python:*-slim" variants - tag+='-slim' - fi - template="Dockerfile-${template}.template" - - { generated_warning; cat "$template"; } > "$dir/Dockerfile" - - sed -ri \ - -e 's/^(ENV GPG_KEY) .*/\1 '"${gpgKeys[$version]:-${gpgKeys[$rcVersion]}}"'/' \ - -e 's/^(ENV PYTHON_VERSION) .*/\1 '"$fullVersion"'/' \ - -e 's/^(ENV PYTHON_RELEASE) .*/\1 '"${fullVersion%%[a-z]*}"'/' \ - -e 's/^(ENV PYTHON_PIP_VERSION) .*/\1 '"$pipVersion"'/' \ - -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"'!' \ - "$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%%.*}" - - if [ "$minor" -ge 8 ]; then - # PROFILE_TASK has a reasonable default starting in 3.8+; see: - # https://bugs.python.org/issue36044 - # https://github.com/python/cpython/pull/14702 - # https://github.com/python/cpython/pull/14910 - perl -0 -i -p -e "s![^\n]+PROFILE_TASK(='[^']+?')?[^\n]+\n!!gs" "$dir/Dockerfile" - fi - if [ "$minor" -ge 9 ]; then - # "wininst-*.exe" is not installed for Unix platforms on Python 3.9+: https://github.com/python/cpython/pull/14511 - sed -ri -e '/wininst/d' "$dir/Dockerfile" - fi - - # https://www.python.org/dev/peps/pep-0615/ - # https://mail.python.org/archives/list/python-dev@python.org/thread/PYXET7BHSETUJHSLFREM5TDZZXDTDTLY/ - if [ "$minor" -lt 9 ]; then - sed -ri -e '/tzdata/d' "$dir/Dockerfile" - fi - done -done From 0ce5f254940573a2f12603c02676b509e7815b46 Mon Sep 17 00:00:00 2001 From: Daniel Schulz Date: Sun, 20 Dec 2020 21:20:21 +0100 Subject: [PATCH 07/19] added nightly builds (pre-alpha) and respective build time stamps --- 3.10-rc/alpine3.12/Dockerfile | 1 + 3.6/alpine3.12/Dockerfile | 1 + 3.7/alpine3.12/Dockerfile | 1 + 3.8/alpine3.12/Dockerfile | 1 + 3.9/alpine3.12/Dockerfile | 1 + 5 files changed, 5 insertions(+) diff --git a/3.10-rc/alpine3.12/Dockerfile b/3.10-rc/alpine3.12/Dockerfile index 72f62319d..ca2d530bd 100644 --- a/3.10-rc/alpine3.12/Dockerfile +++ b/3.10-rc/alpine3.12/Dockerfile @@ -1,6 +1,7 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz +LABEL BUILD_TIME="20201221_2009 UTC" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} diff --git a/3.6/alpine3.12/Dockerfile b/3.6/alpine3.12/Dockerfile index 71c49accc..cd60d23b1 100644 --- a/3.6/alpine3.12/Dockerfile +++ b/3.6/alpine3.12/Dockerfile @@ -1,6 +1,7 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz +LABEL BUILD_TIME="20201221_2009 UTC" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} diff --git a/3.7/alpine3.12/Dockerfile b/3.7/alpine3.12/Dockerfile index 7eaa8bf59..b455f079e 100644 --- a/3.7/alpine3.12/Dockerfile +++ b/3.7/alpine3.12/Dockerfile @@ -1,6 +1,7 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz +LABEL BUILD_TIME="20201221_2009 UTC" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} diff --git a/3.8/alpine3.12/Dockerfile b/3.8/alpine3.12/Dockerfile index 768d1495b..963375734 100644 --- a/3.8/alpine3.12/Dockerfile +++ b/3.8/alpine3.12/Dockerfile @@ -1,6 +1,7 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz +LABEL BUILD_TIME="20201221_2009 UTC" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} diff --git a/3.9/alpine3.12/Dockerfile b/3.9/alpine3.12/Dockerfile index 6240d88cd..5660c7d4a 100644 --- a/3.9/alpine3.12/Dockerfile +++ b/3.9/alpine3.12/Dockerfile @@ -1,6 +1,7 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz +LABEL BUILD_TIME="20201221_2009 UTC" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} From 757b2a58f4e9fe5e57216850bb97445ebc3efc55 Mon Sep 17 00:00:00 2001 From: Daniel Schulz Date: Mon, 28 Dec 2020 13:57:04 +0100 Subject: [PATCH 08/19] added latest CPython references from today (20201228) for all 3.x releases/RCs --- 3.10-rc/alpine3.12/Dockerfile | 4 ++-- 3.6/alpine3.12/Dockerfile | 4 ++-- 3.7/alpine3.12/Dockerfile | 4 ++-- 3.8/alpine3.12/Dockerfile | 4 ++-- 3.9/alpine3.12/Dockerfile | 4 ++-- ds-alpine/Dockerfile | 12 +++++++++--- 6 files changed, 19 insertions(+), 13 deletions(-) diff --git a/3.10-rc/alpine3.12/Dockerfile b/3.10-rc/alpine3.12/Dockerfile index ca2d530bd..d0f1f4dc9 100644 --- a/3.10-rc/alpine3.12/Dockerfile +++ b/3.10-rc/alpine3.12/Dockerfile @@ -1,7 +1,7 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz -LABEL BUILD_TIME="20201221_2009 UTC" +LABEL BUILD_TIME_PYTHON="20201228_1027 UTC" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} @@ -22,7 +22,7 @@ RUN set -eux; \ # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="v3.10.0a3" +ARG CPYTHON_GIT_REFERENCE="v3.10.20201228a" ARG PYTHON_VERSION="${CPYTHON_GIT_REFERENCE}" ENV PYTHON_VERSION=${PYTHON_VERSION} diff --git a/3.6/alpine3.12/Dockerfile b/3.6/alpine3.12/Dockerfile index cd60d23b1..51686d45a 100644 --- a/3.6/alpine3.12/Dockerfile +++ b/3.6/alpine3.12/Dockerfile @@ -1,7 +1,7 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz -LABEL BUILD_TIME="20201221_2009 UTC" +LABEL BUILD_TIME_PYTHON="20201228_1027 UTC" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} @@ -22,7 +22,7 @@ RUN set -eux; \ # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="v3.6.12" +ARG CPYTHON_GIT_REFERENCE="v3.6.20201228rc" ARG PYTHON_VERSION="${CPYTHON_GIT_REFERENCE}" ENV PYTHON_VERSION=${PYTHON_VERSION} diff --git a/3.7/alpine3.12/Dockerfile b/3.7/alpine3.12/Dockerfile index b455f079e..b78b0ec27 100644 --- a/3.7/alpine3.12/Dockerfile +++ b/3.7/alpine3.12/Dockerfile @@ -1,7 +1,7 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz -LABEL BUILD_TIME="20201221_2009 UTC" +LABEL BUILD_TIME_PYTHON="20201228_1027 UTC" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} @@ -22,7 +22,7 @@ RUN set -eux; \ # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="v3.7.9" +ARG CPYTHON_GIT_REFERENCE="v3.7.20201228rc" ARG PYTHON_VERSION="${CPYTHON_GIT_REFERENCE}" ENV PYTHON_VERSION=${PYTHON_VERSION} diff --git a/3.8/alpine3.12/Dockerfile b/3.8/alpine3.12/Dockerfile index 963375734..a85df0139 100644 --- a/3.8/alpine3.12/Dockerfile +++ b/3.8/alpine3.12/Dockerfile @@ -1,7 +1,7 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz -LABEL BUILD_TIME="20201221_2009 UTC" +LABEL BUILD_TIME_PYTHON="20201228_1027 UTC" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} @@ -22,7 +22,7 @@ RUN set -eux; \ # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="v3.8.6" +ARG CPYTHON_GIT_REFERENCE="v3.8.20201228rc" ARG PYTHON_VERSION="${CPYTHON_GIT_REFERENCE}" ENV PYTHON_VERSION=${PYTHON_VERSION} diff --git a/3.9/alpine3.12/Dockerfile b/3.9/alpine3.12/Dockerfile index 5660c7d4a..0491e2e0c 100644 --- a/3.9/alpine3.12/Dockerfile +++ b/3.9/alpine3.12/Dockerfile @@ -1,7 +1,7 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz -LABEL BUILD_TIME="20201221_2009 UTC" +LABEL BUILD_TIME_PYTHON="20201228_1027 UTC" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} @@ -22,7 +22,7 @@ RUN set -eux; \ # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="v3.9.1" +ARG CPYTHON_GIT_REFERENCE="v3.9.20201228rc" ARG PYTHON_VERSION="${CPYTHON_GIT_REFERENCE}" ENV PYTHON_VERSION=${PYTHON_VERSION} diff --git a/ds-alpine/Dockerfile b/ds-alpine/Dockerfile index 5fbf12690..981c09261 100644 --- a/ds-alpine/Dockerfile +++ b/ds-alpine/Dockerfile @@ -1,10 +1,12 @@ -FROM alpine:3.12 +FROM alpine:3.12.3 MAINTAINER Daniel Schulz LABEL SUSTAINABLE_CULTURE="https://sloanreview.mit.edu/culture500/" \ CULTURE_EATS_STRATEGY="Unearthing the Roots of Corporate Social Irresponsibiity (https://www.zinio.com/de/reader/readsvg/447758/56)" \ TEAM_GOALS="https://www.strategy-business.com/blog/Stretch-or-safe-The-art-of-setting-goals-for-your-teams?gko=4d547" \ STRATEGIC_LEADERSHIP_PRINCIPLES="https://www.strategy-business.com/article/10-Principles-of-Strategic-Leadership" \ + SHY_AUTHENTIC_LEADERS="https://hbr.org/2020/12/why-capable-people-are-reluctant-to-lead" \ + EXHAUSTED_LEADERS="https://hbr.org/2020/12/how-to-lead-when-your-team-is-exhausted-and-you-are-too" \ LAZY_LEADERS_HEROIC_MANAGERS="https://www.strategy-business.com/article/Lazy-leaders-and-heroic-managers" \ ROOTS_IRRESPONSIBLE_BEHAVIOUR="The Roots of Corporate Socail Irresponsible Behaviour is Unrealistic Performance Expectations, a Pressure-Cooker Culture and Stress (https://www.zinio.com/de/reader/readsvg/447758/56)" \ VISION="'We are stubborn on vision. We are flexible on details. We don’t give up on things easily.' (Jeff Bezos)" \ @@ -20,9 +22,13 @@ LABEL SUSTAINABLE_CULTURE="https://sloanreview.mit.edu/culture500/" \ AUTHOR_GITHUB="https://github.com/danielschulz" \ AUTHOR_DOCKER_HUB="https://hub.docker.com/u/danielschulz" \ AUTHOR_MEDIUM="https://medium.com/@danielschulz.it" \ - AUTHOR_WEBSITE="http://danielschulz.it" + AUTHOR_WEBSITE="http://danielschulz.it" \ + AUTHOR_DATES="MjAxODEyMTMgMjAxODEyMTcgMjAxOTEwMTUgMjAyMDA4MjEgMjAyMDA5MjYK" \ + THOUGH_LEADERSHIP_FINANCE_BLOG="https://medium.com/wbaa" \ + DEAL_W_TECH_DEBT="https://medium.com/swlh/technical-air-pollution-the-reality-of-technical-debt-5afd96321f46" \ + BUILD_TIME_ALPINE="20201228_1027 UTC" RUN apk update && \ - apk add --no-cache nmap nmap-scripts nmap-nselibs curl wget bind-tools bash + apk add --no-cache nmap nmap-scripts nmap-nselibs curl wget bind-tools bash curl wget CMD [ "bash" ] From 0f04e895fc0e0838ebcda04634118ce80e8738ea Mon Sep 17 00:00:00 2001 From: Daniel Schulz Date: Mon, 28 Dec 2020 16:04:00 +0100 Subject: [PATCH 09/19] lowered versions to 256 in all Python versions added socat to dependencies optimized build script only for multi-core-CPUs --- 3.10-rc/alpine3.12/Dockerfile | 8 ++++---- 3.6/alpine3.12/Dockerfile | 8 ++++---- 3.7/alpine3.12/Dockerfile | 8 ++++---- 3.8/alpine3.12/Dockerfile | 8 ++++---- 3.9/alpine3.12/Dockerfile | 8 ++++---- ds-alpine/Dockerfile | 5 +++-- 6 files changed, 23 insertions(+), 22 deletions(-) diff --git a/3.10-rc/alpine3.12/Dockerfile b/3.10-rc/alpine3.12/Dockerfile index d0f1f4dc9..35274ccf5 100644 --- a/3.10-rc/alpine3.12/Dockerfile +++ b/3.10-rc/alpine3.12/Dockerfile @@ -1,7 +1,7 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz -LABEL BUILD_TIME_PYTHON="20201228_1027 UTC" +LABEL BUILD_TIME_PYTHON="20201228_1455 UTC" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} @@ -22,8 +22,8 @@ RUN set -eux; \ # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="v3.10.20201228a" -ARG PYTHON_VERSION="${CPYTHON_GIT_REFERENCE}" +ARG CPYTHON_GIT_REFERENCE="v3.10.256a" +ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} @@ -82,7 +82,7 @@ RUN set -ex \ --with-system-expat \ --with-system-ffi \ --without-ensurepip \ - && make -j "$(nproc)" \ + && make -j "$( nproc --ignore=1 )" \ # 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" \ diff --git a/3.6/alpine3.12/Dockerfile b/3.6/alpine3.12/Dockerfile index 51686d45a..4ade2ea18 100644 --- a/3.6/alpine3.12/Dockerfile +++ b/3.6/alpine3.12/Dockerfile @@ -1,7 +1,7 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz -LABEL BUILD_TIME_PYTHON="20201228_1027 UTC" +LABEL BUILD_TIME_PYTHON="20201228_1455 UTC" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} @@ -22,8 +22,8 @@ RUN set -eux; \ # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="v3.6.20201228rc" -ARG PYTHON_VERSION="${CPYTHON_GIT_REFERENCE}" +ARG CPYTHON_GIT_REFERENCE="v3.6.256rc" +ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} @@ -82,7 +82,7 @@ RUN set -ex \ --with-system-expat \ --with-system-ffi \ --without-ensurepip \ - && make -j "$(nproc)" \ + && make -j "$( nproc --ignore=1 )" \ # 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" \ diff --git a/3.7/alpine3.12/Dockerfile b/3.7/alpine3.12/Dockerfile index b78b0ec27..f50f62b96 100644 --- a/3.7/alpine3.12/Dockerfile +++ b/3.7/alpine3.12/Dockerfile @@ -1,7 +1,7 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz -LABEL BUILD_TIME_PYTHON="20201228_1027 UTC" +LABEL BUILD_TIME_PYTHON="20201228_1455 UTC" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} @@ -22,8 +22,8 @@ RUN set -eux; \ # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="v3.7.20201228rc" -ARG PYTHON_VERSION="${CPYTHON_GIT_REFERENCE}" +ARG CPYTHON_GIT_REFERENCE="v3.7.256rc" +ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} @@ -82,7 +82,7 @@ RUN set -ex \ --with-system-expat \ --with-system-ffi \ --without-ensurepip \ - && make -j "$(nproc)" \ + && make -j "$( nproc --ignore=1 )" \ # 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" \ diff --git a/3.8/alpine3.12/Dockerfile b/3.8/alpine3.12/Dockerfile index a85df0139..3d23e0354 100644 --- a/3.8/alpine3.12/Dockerfile +++ b/3.8/alpine3.12/Dockerfile @@ -1,7 +1,7 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz -LABEL BUILD_TIME_PYTHON="20201228_1027 UTC" +LABEL BUILD_TIME_PYTHON="20201228_1455 UTC" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} @@ -22,8 +22,8 @@ RUN set -eux; \ # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="v3.8.20201228rc" -ARG PYTHON_VERSION="${CPYTHON_GIT_REFERENCE}" +ARG CPYTHON_GIT_REFERENCE="v3.8.256rc" +ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} @@ -82,7 +82,7 @@ RUN set -ex \ --with-system-expat \ --with-system-ffi \ --without-ensurepip \ - && make -j "$(nproc)" \ + && make -j "$( nproc --ignore=1 )" \ # 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" \ diff --git a/3.9/alpine3.12/Dockerfile b/3.9/alpine3.12/Dockerfile index 0491e2e0c..924093096 100644 --- a/3.9/alpine3.12/Dockerfile +++ b/3.9/alpine3.12/Dockerfile @@ -1,7 +1,7 @@ FROM danielschulz/alpine:v3.12 MAINTAINER Daniel Schulz -LABEL BUILD_TIME_PYTHON="20201228_1027 UTC" +LABEL BUILD_TIME_PYTHON="20201228_1455 UTC" # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} @@ -22,8 +22,8 @@ RUN set -eux; \ # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="v3.9.20201228rc" -ARG PYTHON_VERSION="${CPYTHON_GIT_REFERENCE}" +ARG CPYTHON_GIT_REFERENCE="v3.9.256rc" +ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} @@ -82,7 +82,7 @@ RUN set -ex \ --with-system-expat \ --with-system-ffi \ --without-ensurepip \ - && make -j "$(nproc)" \ + && make -j "$( nproc --ignore=1 )" \ # 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" \ diff --git a/ds-alpine/Dockerfile b/ds-alpine/Dockerfile index 981c09261..5347b40af 100644 --- a/ds-alpine/Dockerfile +++ b/ds-alpine/Dockerfile @@ -26,9 +26,10 @@ LABEL SUSTAINABLE_CULTURE="https://sloanreview.mit.edu/culture500/" \ AUTHOR_DATES="MjAxODEyMTMgMjAxODEyMTcgMjAxOTEwMTUgMjAyMDA4MjEgMjAyMDA5MjYK" \ THOUGH_LEADERSHIP_FINANCE_BLOG="https://medium.com/wbaa" \ DEAL_W_TECH_DEBT="https://medium.com/swlh/technical-air-pollution-the-reality-of-technical-debt-5afd96321f46" \ - BUILD_TIME_ALPINE="20201228_1027 UTC" + BUILD_TIME_ALPINE="20201228_1445 UTC" \ + ONLY_DEAD_FISH_GO_W_FLOW="http://readingchomsky.blogspot.com/2014/07/noam-chomsky-2014-how-to-ruin-economy.html" RUN apk update && \ - apk add --no-cache nmap nmap-scripts nmap-nselibs curl wget bind-tools bash curl wget + apk add --no-cache nmap nmap-scripts nmap-nselibs curl wget bind-tools bash curl wget socat CMD [ "bash" ] From b564f31b37e0cfc1b31cf61104790454423612ed Mon Sep 17 00:00:00 2001 From: Daniel Schulz Date: Mon, 28 Dec 2020 16:25:08 +0100 Subject: [PATCH 10/19] fixed master/3.10 issue w/ pre-existing tags in GH remote --- 3.10-rc/alpine3.12/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.10-rc/alpine3.12/Dockerfile b/3.10-rc/alpine3.12/Dockerfile index 35274ccf5..150a92657 100644 --- a/3.10-rc/alpine3.12/Dockerfile +++ b/3.10-rc/alpine3.12/Dockerfile @@ -22,7 +22,7 @@ RUN set -eux; \ # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="v3.10.256a" +ARG CPYTHON_GIT_REFERENCE="v3.10.256a_20201228_1455" ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} From a5f2675d7c4c9e19efb819bc5753a72f4952368e Mon Sep 17 00:00:00 2001 From: Daniel Schulz Date: Mon, 28 Dec 2020 16:36:37 +0100 Subject: [PATCH 11/19] added logging versions in build log -- versions for both Python and PIP --- 3.10-rc/alpine3.12/Dockerfile | 3 +++ 3.6/alpine3.12/Dockerfile | 3 +++ 3.7/alpine3.12/Dockerfile | 3 +++ 3.8/alpine3.12/Dockerfile | 3 +++ 3.9/alpine3.12/Dockerfile | 3 +++ 5 files changed, 15 insertions(+) diff --git a/3.10-rc/alpine3.12/Dockerfile b/3.10-rc/alpine3.12/Dockerfile index 150a92657..f0498e555 100644 --- a/3.10-rc/alpine3.12/Dockerfile +++ b/3.10-rc/alpine3.12/Dockerfile @@ -138,4 +138,7 @@ RUN set -ex; \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py +RUN echo -e "Current Python version is $( python -V ) \n(found in $( which python ))." && \ + echo -e "Current PIP version is $( pip -V ) \n(found in $( which pip ))." + CMD ["python3"] diff --git a/3.6/alpine3.12/Dockerfile b/3.6/alpine3.12/Dockerfile index 4ade2ea18..8fe6dd325 100644 --- a/3.6/alpine3.12/Dockerfile +++ b/3.6/alpine3.12/Dockerfile @@ -138,4 +138,7 @@ RUN set -ex; \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py +RUN echo -e "Current Python version is $( python -V ) \n(found in $( which python ))." && \ + echo -e "Current PIP version is $( pip -V ) \n(found in $( which pip ))." + CMD ["python3"] diff --git a/3.7/alpine3.12/Dockerfile b/3.7/alpine3.12/Dockerfile index f50f62b96..425ae2cae 100644 --- a/3.7/alpine3.12/Dockerfile +++ b/3.7/alpine3.12/Dockerfile @@ -138,4 +138,7 @@ RUN set -ex; \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py +RUN echo -e "Current Python version is $( python -V ) \n(found in $( which python ))." && \ + echo -e "Current PIP version is $( pip -V ) \n(found in $( which pip ))." + CMD ["python3"] diff --git a/3.8/alpine3.12/Dockerfile b/3.8/alpine3.12/Dockerfile index 3d23e0354..ad71f148c 100644 --- a/3.8/alpine3.12/Dockerfile +++ b/3.8/alpine3.12/Dockerfile @@ -138,4 +138,7 @@ RUN set -ex; \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py +RUN echo -e "Current Python version is $( python -V ) \n(found in $( which python ))." && \ + echo -e "Current PIP version is $( pip -V ) \n(found in $( which pip ))." + CMD ["python3"] diff --git a/3.9/alpine3.12/Dockerfile b/3.9/alpine3.12/Dockerfile index 924093096..ac58b6781 100644 --- a/3.9/alpine3.12/Dockerfile +++ b/3.9/alpine3.12/Dockerfile @@ -138,4 +138,7 @@ RUN set -ex; \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py +RUN echo -e "Current Python version is $( python -V ) \n(found in $( which python ))." && \ + echo -e "Current PIP version is $( pip -V ) \n(found in $( which pip ))." + CMD ["python3"] From 418755b79b76bdc050b63973905250d1f01b0712 Mon Sep 17 00:00:00 2001 From: Daniel Schulz Date: Thu, 21 Jan 2021 18:35:01 +0100 Subject: [PATCH 12/19] added latest Python in Docker builds for 3.7, 3.8, 3.9 and 3.10 --- 3.10-rc/{alpine3.12 => alpine3.13}/Dockerfile | 7 ++++--- 3.6/{alpine3.12 => alpine3.13}/Dockerfile | 6 +++--- 3.7/{alpine3.12 => alpine3.13}/Dockerfile | 6 +++--- 3.8/{alpine3.12 => alpine3.13}/Dockerfile | 7 ++++--- 3.9/{alpine3.12 => alpine3.13}/Dockerfile | 7 ++++--- ds-alpine/Dockerfile | 2 +- 6 files changed, 19 insertions(+), 16 deletions(-) rename 3.10-rc/{alpine3.12 => alpine3.13}/Dockerfile (96%) rename 3.6/{alpine3.12 => alpine3.13}/Dockerfile (96%) rename 3.7/{alpine3.12 => alpine3.13}/Dockerfile (96%) rename 3.8/{alpine3.12 => alpine3.13}/Dockerfile (96%) rename 3.9/{alpine3.12 => alpine3.13}/Dockerfile (96%) diff --git a/3.10-rc/alpine3.12/Dockerfile b/3.10-rc/alpine3.13/Dockerfile similarity index 96% rename from 3.10-rc/alpine3.12/Dockerfile rename to 3.10-rc/alpine3.13/Dockerfile index f0498e555..f0cffd653 100644 --- a/3.10-rc/alpine3.12/Dockerfile +++ b/3.10-rc/alpine3.13/Dockerfile @@ -1,7 +1,8 @@ -FROM danielschulz/alpine:v3.12 -MAINTAINER Daniel Schulz -LABEL BUILD_TIME_PYTHON="20201228_1455 UTC" +FROM danielschulz/alpine:3.13.0 + +LABEL BUILD_TIME_PYTHON="20210121_1512 UTC" \ + MAINTAINER="Daniel Schulz " # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} diff --git a/3.6/alpine3.12/Dockerfile b/3.6/alpine3.13/Dockerfile similarity index 96% rename from 3.6/alpine3.12/Dockerfile rename to 3.6/alpine3.13/Dockerfile index 8fe6dd325..165390f0e 100644 --- a/3.6/alpine3.12/Dockerfile +++ b/3.6/alpine3.13/Dockerfile @@ -1,8 +1,8 @@ -FROM danielschulz/alpine:v3.12 -MAINTAINER Daniel Schulz -LABEL BUILD_TIME_PYTHON="20201228_1455 UTC" +FROM danielschulz/alpine:3.13.0 +LABEL BUILD_TIME_PYTHON="20210121_1512 UTC" \ + MAINTAINER="Daniel Schulz " # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} diff --git a/3.7/alpine3.12/Dockerfile b/3.7/alpine3.13/Dockerfile similarity index 96% rename from 3.7/alpine3.12/Dockerfile rename to 3.7/alpine3.13/Dockerfile index 425ae2cae..f396763e3 100644 --- a/3.7/alpine3.12/Dockerfile +++ b/3.7/alpine3.13/Dockerfile @@ -1,8 +1,8 @@ -FROM danielschulz/alpine:v3.12 -MAINTAINER Daniel Schulz -LABEL BUILD_TIME_PYTHON="20201228_1455 UTC" +FROM danielschulz/alpine:3.13.0 +LABEL BUILD_TIME_PYTHON="20210121_1512 UTC" \ + MAINTAINER="Daniel Schulz " # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} diff --git a/3.8/alpine3.12/Dockerfile b/3.8/alpine3.13/Dockerfile similarity index 96% rename from 3.8/alpine3.12/Dockerfile rename to 3.8/alpine3.13/Dockerfile index ad71f148c..2f786f2b6 100644 --- a/3.8/alpine3.12/Dockerfile +++ b/3.8/alpine3.13/Dockerfile @@ -1,7 +1,8 @@ -FROM danielschulz/alpine:v3.12 -MAINTAINER Daniel Schulz -LABEL BUILD_TIME_PYTHON="20201228_1455 UTC" +FROM danielschulz/alpine:3.13.0 + +LABEL BUILD_TIME_PYTHON="20210121_1512 UTC" \ + MAINTAINER="Daniel Schulz " # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} diff --git a/3.9/alpine3.12/Dockerfile b/3.9/alpine3.13/Dockerfile similarity index 96% rename from 3.9/alpine3.12/Dockerfile rename to 3.9/alpine3.13/Dockerfile index ac58b6781..d577a3808 100644 --- a/3.9/alpine3.12/Dockerfile +++ b/3.9/alpine3.13/Dockerfile @@ -1,7 +1,8 @@ -FROM danielschulz/alpine:v3.12 -MAINTAINER Daniel Schulz -LABEL BUILD_TIME_PYTHON="20201228_1455 UTC" +FROM danielschulz/alpine:3.13.0 + +LABEL BUILD_TIME_PYTHON="20210121_1512 UTC" \ + MAINTAINER="Daniel Schulz " # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} diff --git a/ds-alpine/Dockerfile b/ds-alpine/Dockerfile index 5347b40af..72833f183 100644 --- a/ds-alpine/Dockerfile +++ b/ds-alpine/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.12.3 +FROM alpine:3.13.0 MAINTAINER Daniel Schulz LABEL SUSTAINABLE_CULTURE="https://sloanreview.mit.edu/culture500/" \ From 92ed9fe6182e84b60166c4348b405bf550317881 Mon Sep 17 00:00:00 2001 From: Daniel Schulz Date: Wed, 10 Feb 2021 19:48:27 +0100 Subject: [PATCH 13/19] added latest Python in Docker builds for 3.7, 3.8, 3.9 and 3.10 Signed-off-by: Daniel Schulz --- 3.10-rc/alpine3.13/Dockerfile | 4 ++-- 3.6/alpine3.13/Dockerfile | 4 ++-- 3.7/alpine3.13/Dockerfile | 4 ++-- 3.8/alpine3.13/Dockerfile | 4 ++-- 3.9/alpine3.13/Dockerfile | 4 ++-- ds-alpine/Dockerfile | 5 +++-- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/3.10-rc/alpine3.13/Dockerfile b/3.10-rc/alpine3.13/Dockerfile index f0cffd653..e2c4655b8 100644 --- a/3.10-rc/alpine3.13/Dockerfile +++ b/3.10-rc/alpine3.13/Dockerfile @@ -1,7 +1,7 @@ -FROM danielschulz/alpine:3.13.0 +FROM danielschulz/alpine:3.13.1 -LABEL BUILD_TIME_PYTHON="20210121_1512 UTC" \ +LABEL BUILD_TIME_PYTHON="20210210_1843 UTC" \ MAINTAINER="Daniel Schulz " # ensure local python is preferred over distribution python diff --git a/3.6/alpine3.13/Dockerfile b/3.6/alpine3.13/Dockerfile index 165390f0e..bd29169f6 100644 --- a/3.6/alpine3.13/Dockerfile +++ b/3.6/alpine3.13/Dockerfile @@ -1,7 +1,7 @@ -FROM danielschulz/alpine:3.13.0 +FROM danielschulz/alpine:3.13.1 -LABEL BUILD_TIME_PYTHON="20210121_1512 UTC" \ +LABEL BUILD_TIME_PYTHON="20210210_1843 UTC" \ MAINTAINER="Daniel Schulz " # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} diff --git a/3.7/alpine3.13/Dockerfile b/3.7/alpine3.13/Dockerfile index f396763e3..d810855fc 100644 --- a/3.7/alpine3.13/Dockerfile +++ b/3.7/alpine3.13/Dockerfile @@ -1,7 +1,7 @@ -FROM danielschulz/alpine:3.13.0 +FROM danielschulz/alpine:3.13.1 -LABEL BUILD_TIME_PYTHON="20210121_1512 UTC" \ +LABEL BUILD_TIME_PYTHON="20210210_1843 UTC" \ MAINTAINER="Daniel Schulz " # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} diff --git a/3.8/alpine3.13/Dockerfile b/3.8/alpine3.13/Dockerfile index 2f786f2b6..9569bd66a 100644 --- a/3.8/alpine3.13/Dockerfile +++ b/3.8/alpine3.13/Dockerfile @@ -1,7 +1,7 @@ -FROM danielschulz/alpine:3.13.0 +FROM danielschulz/alpine:3.13.1 -LABEL BUILD_TIME_PYTHON="20210121_1512 UTC" \ +LABEL BUILD_TIME_PYTHON="20210210_1843 UTC" \ MAINTAINER="Daniel Schulz " # ensure local python is preferred over distribution python diff --git a/3.9/alpine3.13/Dockerfile b/3.9/alpine3.13/Dockerfile index d577a3808..9f2f7f1b3 100644 --- a/3.9/alpine3.13/Dockerfile +++ b/3.9/alpine3.13/Dockerfile @@ -1,7 +1,7 @@ -FROM danielschulz/alpine:3.13.0 +FROM danielschulz/alpine:3.13.1 -LABEL BUILD_TIME_PYTHON="20210121_1512 UTC" \ +LABEL BUILD_TIME_PYTHON="20210210_1843 UTC" \ MAINTAINER="Daniel Schulz " # ensure local python is preferred over distribution python diff --git a/ds-alpine/Dockerfile b/ds-alpine/Dockerfile index 72833f183..a6761e71e 100644 --- a/ds-alpine/Dockerfile +++ b/ds-alpine/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.13.0 +FROM alpine:3.13.1 MAINTAINER Daniel Schulz LABEL SUSTAINABLE_CULTURE="https://sloanreview.mit.edu/culture500/" \ @@ -27,7 +27,8 @@ LABEL SUSTAINABLE_CULTURE="https://sloanreview.mit.edu/culture500/" \ THOUGH_LEADERSHIP_FINANCE_BLOG="https://medium.com/wbaa" \ DEAL_W_TECH_DEBT="https://medium.com/swlh/technical-air-pollution-the-reality-of-technical-debt-5afd96321f46" \ BUILD_TIME_ALPINE="20201228_1445 UTC" \ - ONLY_DEAD_FISH_GO_W_FLOW="http://readingchomsky.blogspot.com/2014/07/noam-chomsky-2014-how-to-ruin-economy.html" + ONLY_DEAD_FISH_GO_W_FLOW="http://readingchomsky.blogspot.com/2014/07/noam-chomsky-2014-how-to-ruin-economy.html" \ + HOW_TO_KILL_TIME_PRODUCTIVITY_AND_TEAM_MORALE="https://en.wikipedia.org/wiki/Wikipedia:Lamest_edit_wars" RUN apk update && \ apk add --no-cache nmap nmap-scripts nmap-nselibs curl wget bind-tools bash curl wget socat From 593d38cf30432ea7bd27f49e0a2803d22667b65d Mon Sep 17 00:00:00 2001 From: Daniel Schulz Date: Wed, 3 Mar 2021 15:06:45 +0100 Subject: [PATCH 14/19] updated latest alpine dependencies Signed-off-by: Daniel Schulz --- 3.10-rc/alpine3.13/Dockerfile | 168 ++++++++++++++++++++++++++++ 3.6/alpine3.13/Dockerfile | 202 +++++++++++++++++++++++++++++++++ 3.7/alpine3.13/Dockerfile | 203 ++++++++++++++++++++++++++++++++++ 3.8/alpine3.13/Dockerfile | 28 +++++ 3.9/alpine3.13/Dockerfile | 146 ++++++++++++++++++++++++ 5 files changed, 747 insertions(+) diff --git a/3.10-rc/alpine3.13/Dockerfile b/3.10-rc/alpine3.13/Dockerfile index e2c4655b8..7b35ea140 100644 --- a/3.10-rc/alpine3.13/Dockerfile +++ b/3.10-rc/alpine3.13/Dockerfile @@ -1,3 +1,4 @@ +<<<<<<< HEAD FROM danielschulz/alpine:3.13.1 @@ -21,12 +22,20 @@ RUN set -eux; \ ; # other runtime dependencies for Python are installed later +<<<<<<<< HEAD:3.10-rc/alpine3.13/Dockerfile # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" ARG CPYTHON_GIT_REFERENCE="v3.10.256a_20201228_1455" ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} +|||||||| 0559964:3.9/alpine3.12/Dockerfile +ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 +ENV PYTHON_VERSION 3.9.0 +======== +ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 +ENV PYTHON_VERSION 3.9.2 +>>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.9/alpine3.12/Dockerfile RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ @@ -114,10 +123,24 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +<<<<<<<< HEAD:3.10-rc/alpine3.13/Dockerfile ENV PYTHON_PIP_VERSION 20.3.3 +|||||||| 0559964:3.9/alpine3.12/Dockerfile +ENV PYTHON_PIP_VERSION 20.3.1 +======== +ENV PYTHON_PIP_VERSION 21.0.1 +>>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.9/alpine3.12/Dockerfile # https://github.com/pypa/get-pip +<<<<<<<< HEAD:3.10-rc/alpine3.13/Dockerfile ENV PYTHON_GET_PIP_URL https://raw.githubusercontent.com/pypa/get-pip/${PYTHON_PIP_VERSION}/get-pip.py ENV PYTHON_GET_PIP_SHA256 6a0b13826862f33c13b614a921d36253bfa1ae779c5fbf569876f3585057e9d2 +|||||||| 0559964:3.9/alpine3.12/Dockerfile +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py +ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 +======== +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/b60e2320d9e8d02348525bd74e871e466afdf77c/get-pip.py +ENV PYTHON_GET_PIP_SHA256 c3b81e5d06371e135fb3156dc7d8fd6270735088428c4a9a5ec1f342e2024565 +>>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.9/alpine3.12/Dockerfile RUN set -ex; \ \ @@ -143,3 +166,148 @@ RUN echo -e "Current Python version is $( python -V ) \n(found in $( which pytho echo -e "Current PIP version is $( pip -V ) \n(found in $( which pip ))." CMD ["python3"] +||||||| 0559964 +======= +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM alpine:3.13 + +# 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 + +# runtime dependencies +RUN set -eux; \ + apk add --no-cache \ +# install ca-certificates so that HTTPS works consistently + ca-certificates \ +# and tzdata for PEP 615 (https://www.python.org/dev/peps/pep-0615/) + tzdata \ + ; +# other runtime dependencies for Python are installed later + +ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION 3.10.0a6 + +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" \ + && 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 '{}' + \ + \ + && 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 21.0.1 +# https://github.com/pypa/get-pip +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/b60e2320d9e8d02348525bd74e871e466afdf77c/get-pip.py +ENV PYTHON_GET_PIP_SHA256 c3b81e5d06371e135fb3156dc7d8fd6270735088428c4a9a5ec1f342e2024565 + +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"] +>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5 diff --git a/3.6/alpine3.13/Dockerfile b/3.6/alpine3.13/Dockerfile index bd29169f6..6a4332eb2 100644 --- a/3.6/alpine3.13/Dockerfile +++ b/3.6/alpine3.13/Dockerfile @@ -1,3 +1,4 @@ +<<<<<<< HEAD FROM danielschulz/alpine:3.13.1 @@ -20,12 +21,20 @@ RUN set -eux; \ ; # other runtime dependencies for Python are installed later +<<<<<<<< HEAD:3.6/alpine3.13/Dockerfile # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" ARG CPYTHON_GIT_REFERENCE="v3.6.256rc" ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} +|||||||| 0559964:3.10-rc/alpine3.12/Dockerfile +ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION 3.10.0a2 +======== +ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION 3.10.0a6 +>>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.10-rc/alpine3.12/Dockerfile RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ @@ -113,10 +122,24 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +<<<<<<<< HEAD:3.6/alpine3.13/Dockerfile ENV PYTHON_PIP_VERSION 20.3.3 +|||||||| 0559964:3.10-rc/alpine3.12/Dockerfile +ENV PYTHON_PIP_VERSION 20.3.1 +======== +ENV PYTHON_PIP_VERSION 21.0.1 +>>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.10-rc/alpine3.12/Dockerfile # https://github.com/pypa/get-pip +<<<<<<<< HEAD:3.6/alpine3.13/Dockerfile ENV PYTHON_GET_PIP_URL https://raw.githubusercontent.com/pypa/get-pip/${PYTHON_PIP_VERSION}/get-pip.py ENV PYTHON_GET_PIP_SHA256 6a0b13826862f33c13b614a921d36253bfa1ae779c5fbf569876f3585057e9d2 +|||||||| 0559964:3.10-rc/alpine3.12/Dockerfile +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py +ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 +======== +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/b60e2320d9e8d02348525bd74e871e466afdf77c/get-pip.py +ENV PYTHON_GET_PIP_SHA256 c3b81e5d06371e135fb3156dc7d8fd6270735088428c4a9a5ec1f342e2024565 +>>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.10-rc/alpine3.12/Dockerfile RUN set -ex; \ \ @@ -142,3 +165,182 @@ RUN echo -e "Current Python version is $( python -V ) \n(found in $( which pytho echo -e "Current PIP version is $( pip -V ) \n(found in $( which pip ))." CMD ["python3"] +||||||| 0559964 +======= +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM alpine:3.13 + +# 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 + +# runtime dependencies +RUN set -eux; \ + apk add --no-cache \ +# install ca-certificates so that HTTPS works consistently + ca-certificates \ + ; +# other runtime dependencies for Python are installed later + +ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D +ENV PYTHON_VERSION 3.6.13 + +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 21.0.1 +# https://github.com/pypa/get-pip +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/b60e2320d9e8d02348525bd74e871e466afdf77c/get-pip.py +ENV PYTHON_GET_PIP_SHA256 c3b81e5d06371e135fb3156dc7d8fd6270735088428c4a9a5ec1f342e2024565 + +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"] +>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5 diff --git a/3.7/alpine3.13/Dockerfile b/3.7/alpine3.13/Dockerfile index d810855fc..98a79c029 100644 --- a/3.7/alpine3.13/Dockerfile +++ b/3.7/alpine3.13/Dockerfile @@ -1,3 +1,4 @@ +<<<<<<< HEAD FROM danielschulz/alpine:3.13.1 @@ -20,12 +21,20 @@ RUN set -eux; \ ; # other runtime dependencies for Python are installed later +<<<<<<<< HEAD:3.7/alpine3.13/Dockerfile # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" ARG CPYTHON_GIT_REFERENCE="v3.7.256rc" ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} +|||||||| 0559964:3.8/alpine3.12/Dockerfile +ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 +ENV PYTHON_VERSION 3.8.6 +======== +ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 +ENV PYTHON_VERSION 3.8.8 +>>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.8/alpine3.12/Dockerfile RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ @@ -113,10 +122,24 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +<<<<<<<< HEAD:3.7/alpine3.13/Dockerfile ENV PYTHON_PIP_VERSION 20.3.3 +|||||||| 0559964:3.8/alpine3.12/Dockerfile +ENV PYTHON_PIP_VERSION 20.3.1 +======== +ENV PYTHON_PIP_VERSION 21.0.1 +>>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.8/alpine3.12/Dockerfile # https://github.com/pypa/get-pip +<<<<<<<< HEAD:3.7/alpine3.13/Dockerfile ENV PYTHON_GET_PIP_URL https://raw.githubusercontent.com/pypa/get-pip/${PYTHON_PIP_VERSION}/get-pip.py ENV PYTHON_GET_PIP_SHA256 6a0b13826862f33c13b614a921d36253bfa1ae779c5fbf569876f3585057e9d2 +|||||||| 0559964:3.8/alpine3.12/Dockerfile +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py +ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 +======== +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/b60e2320d9e8d02348525bd74e871e466afdf77c/get-pip.py +ENV PYTHON_GET_PIP_SHA256 c3b81e5d06371e135fb3156dc7d8fd6270735088428c4a9a5ec1f342e2024565 +>>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.8/alpine3.12/Dockerfile RUN set -ex; \ \ @@ -142,3 +165,183 @@ RUN echo -e "Current Python version is $( python -V ) \n(found in $( which pytho echo -e "Current PIP version is $( pip -V ) \n(found in $( which pip ))." CMD ["python3"] +||||||| 0559964 +======= +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM alpine:3.13 + +# 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 + +# runtime dependencies +RUN set -eux; \ + apk add --no-cache \ +# install ca-certificates so that HTTPS works consistently + ca-certificates \ + ; +# other runtime dependencies for Python are installed later + +ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D +ENV PYTHON_VERSION 3.7.10 + +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 21.0.1 +# https://github.com/pypa/get-pip +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/b60e2320d9e8d02348525bd74e871e466afdf77c/get-pip.py +ENV PYTHON_GET_PIP_SHA256 c3b81e5d06371e135fb3156dc7d8fd6270735088428c4a9a5ec1f342e2024565 + +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"] +>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5 diff --git a/3.8/alpine3.13/Dockerfile b/3.8/alpine3.13/Dockerfile index 9569bd66a..b49df6ca8 100644 --- a/3.8/alpine3.13/Dockerfile +++ b/3.8/alpine3.13/Dockerfile @@ -1,8 +1,14 @@ +<<<<<<< HEAD:3.8/alpine3.13/Dockerfile FROM danielschulz/alpine:3.13.1 LABEL BUILD_TIME_PYTHON="20210210_1843 UTC" \ MAINTAINER="Daniel Schulz " +||||||| 0559964:3.8/alpine3.11/Dockerfile +FROM alpine:3.11 +======= +FROM alpine:3.13 +>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.8/alpine3.11/Dockerfile # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} @@ -21,12 +27,20 @@ RUN set -eux; \ ; # other runtime dependencies for Python are installed later +<<<<<<< HEAD:3.8/alpine3.13/Dockerfile # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" ARG CPYTHON_GIT_REFERENCE="v3.8.256rc" ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} +||||||| 0559964:3.8/alpine3.11/Dockerfile +ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 +ENV PYTHON_VERSION 3.8.6 +======= +ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 +ENV PYTHON_VERSION 3.8.8 +>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.8/alpine3.11/Dockerfile RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ @@ -114,10 +128,24 @@ RUN cd /usr/local/bin \ && ln -s python3-config python-config # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +<<<<<<< HEAD:3.8/alpine3.13/Dockerfile ENV PYTHON_PIP_VERSION 20.3.3 +||||||| 0559964:3.8/alpine3.11/Dockerfile +ENV PYTHON_PIP_VERSION 20.3.1 +======= +ENV PYTHON_PIP_VERSION 21.0.1 +>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.8/alpine3.11/Dockerfile # https://github.com/pypa/get-pip +<<<<<<< HEAD:3.8/alpine3.13/Dockerfile ENV PYTHON_GET_PIP_URL https://raw.githubusercontent.com/pypa/get-pip/${PYTHON_PIP_VERSION}/get-pip.py ENV PYTHON_GET_PIP_SHA256 6a0b13826862f33c13b614a921d36253bfa1ae779c5fbf569876f3585057e9d2 +||||||| 0559964:3.8/alpine3.11/Dockerfile +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py +ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 +======= +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/b60e2320d9e8d02348525bd74e871e466afdf77c/get-pip.py +ENV PYTHON_GET_PIP_SHA256 c3b81e5d06371e135fb3156dc7d8fd6270735088428c4a9a5ec1f342e2024565 +>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.8/alpine3.11/Dockerfile RUN set -ex; \ \ diff --git a/3.9/alpine3.13/Dockerfile b/3.9/alpine3.13/Dockerfile index 9f2f7f1b3..3c7c087f4 100644 --- a/3.9/alpine3.13/Dockerfile +++ b/3.9/alpine3.13/Dockerfile @@ -1,3 +1,4 @@ +<<<<<<< HEAD FROM danielschulz/alpine:3.13.1 @@ -143,3 +144,148 @@ RUN echo -e "Current Python version is $( python -V ) \n(found in $( which pytho echo -e "Current PIP version is $( pip -V ) \n(found in $( which pip ))." CMD ["python3"] +||||||| 0559964 +======= +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM alpine:3.13 + +# 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 + +# runtime dependencies +RUN set -eux; \ + apk add --no-cache \ +# install ca-certificates so that HTTPS works consistently + ca-certificates \ +# and tzdata for PEP 615 (https://www.python.org/dev/peps/pep-0615/) + tzdata \ + ; +# other runtime dependencies for Python are installed later + +ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 +ENV PYTHON_VERSION 3.9.2 + +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" \ + && 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 '{}' + \ + \ + && 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 21.0.1 +# https://github.com/pypa/get-pip +ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/b60e2320d9e8d02348525bd74e871e466afdf77c/get-pip.py +ENV PYTHON_GET_PIP_SHA256 c3b81e5d06371e135fb3156dc7d8fd6270735088428c4a9a5ec1f342e2024565 + +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"] +>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5 From ecd939251c53c9e347c81a43fa4e1cbaadfd5566 Mon Sep 17 00:00:00 2001 From: Daniel Schulz Date: Wed, 3 Mar 2021 15:15:00 +0100 Subject: [PATCH 15/19] added .gitignore file Signed-off-by: Daniel Schulz --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..485dee64b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea From e4bb184a3c420be3ae62611fad92205d252a619e Mon Sep 17 00:00:00 2001 From: Daniel Schulz Date: Wed, 3 Mar 2021 15:17:27 +0100 Subject: [PATCH 16/19] Revert "updated latest alpine dependencies" getting out this commit: 593d38cf30432ea7bd27f49e0a2803d22667b65d This reverts commit 593d38cf Signed-off-by: Daniel Schulz --- 3.10-rc/alpine3.13/Dockerfile | 168 ---------------------------- 3.6/alpine3.13/Dockerfile | 202 --------------------------------- 3.7/alpine3.13/Dockerfile | 203 ---------------------------------- 3.8/alpine3.13/Dockerfile | 28 ----- 3.9/alpine3.13/Dockerfile | 146 ------------------------ 5 files changed, 747 deletions(-) diff --git a/3.10-rc/alpine3.13/Dockerfile b/3.10-rc/alpine3.13/Dockerfile index 7b35ea140..e2c4655b8 100644 --- a/3.10-rc/alpine3.13/Dockerfile +++ b/3.10-rc/alpine3.13/Dockerfile @@ -1,4 +1,3 @@ -<<<<<<< HEAD FROM danielschulz/alpine:3.13.1 @@ -22,20 +21,12 @@ RUN set -eux; \ ; # other runtime dependencies for Python are installed later -<<<<<<<< HEAD:3.10-rc/alpine3.13/Dockerfile # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" ARG CPYTHON_GIT_REFERENCE="v3.10.256a_20201228_1455" ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} -|||||||| 0559964:3.9/alpine3.12/Dockerfile -ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.9.0 -======== -ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.9.2 ->>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.9/alpine3.12/Dockerfile RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ @@ -123,24 +114,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 ''" -<<<<<<<< HEAD:3.10-rc/alpine3.13/Dockerfile ENV PYTHON_PIP_VERSION 20.3.3 -|||||||| 0559964:3.9/alpine3.12/Dockerfile -ENV PYTHON_PIP_VERSION 20.3.1 -======== -ENV PYTHON_PIP_VERSION 21.0.1 ->>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.9/alpine3.12/Dockerfile # https://github.com/pypa/get-pip -<<<<<<<< HEAD:3.10-rc/alpine3.13/Dockerfile ENV PYTHON_GET_PIP_URL https://raw.githubusercontent.com/pypa/get-pip/${PYTHON_PIP_VERSION}/get-pip.py ENV PYTHON_GET_PIP_SHA256 6a0b13826862f33c13b614a921d36253bfa1ae779c5fbf569876f3585057e9d2 -|||||||| 0559964:3.9/alpine3.12/Dockerfile -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 -======== -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/b60e2320d9e8d02348525bd74e871e466afdf77c/get-pip.py -ENV PYTHON_GET_PIP_SHA256 c3b81e5d06371e135fb3156dc7d8fd6270735088428c4a9a5ec1f342e2024565 ->>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.9/alpine3.12/Dockerfile RUN set -ex; \ \ @@ -166,148 +143,3 @@ RUN echo -e "Current Python version is $( python -V ) \n(found in $( which pytho echo -e "Current PIP version is $( pip -V ) \n(found in $( which pip ))." CMD ["python3"] -||||||| 0559964 -======= -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.13 - -# 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 - -# runtime dependencies -RUN set -eux; \ - apk add --no-cache \ -# install ca-certificates so that HTTPS works consistently - ca-certificates \ -# and tzdata for PEP 615 (https://www.python.org/dev/peps/pep-0615/) - tzdata \ - ; -# other runtime dependencies for Python are installed later - -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.10.0a6 - -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" \ - && 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 '{}' + \ - \ - && 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 21.0.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/b60e2320d9e8d02348525bd74e871e466afdf77c/get-pip.py -ENV PYTHON_GET_PIP_SHA256 c3b81e5d06371e135fb3156dc7d8fd6270735088428c4a9a5ec1f342e2024565 - -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"] ->>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5 diff --git a/3.6/alpine3.13/Dockerfile b/3.6/alpine3.13/Dockerfile index 6a4332eb2..bd29169f6 100644 --- a/3.6/alpine3.13/Dockerfile +++ b/3.6/alpine3.13/Dockerfile @@ -1,4 +1,3 @@ -<<<<<<< HEAD FROM danielschulz/alpine:3.13.1 @@ -21,20 +20,12 @@ RUN set -eux; \ ; # other runtime dependencies for Python are installed later -<<<<<<<< HEAD:3.6/alpine3.13/Dockerfile # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" ARG CPYTHON_GIT_REFERENCE="v3.6.256rc" ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} -|||||||| 0559964:3.10-rc/alpine3.12/Dockerfile -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.10.0a2 -======== -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.10.0a6 ->>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.10-rc/alpine3.12/Dockerfile RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ @@ -122,24 +113,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 ''" -<<<<<<<< HEAD:3.6/alpine3.13/Dockerfile ENV PYTHON_PIP_VERSION 20.3.3 -|||||||| 0559964:3.10-rc/alpine3.12/Dockerfile -ENV PYTHON_PIP_VERSION 20.3.1 -======== -ENV PYTHON_PIP_VERSION 21.0.1 ->>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.10-rc/alpine3.12/Dockerfile # https://github.com/pypa/get-pip -<<<<<<<< HEAD:3.6/alpine3.13/Dockerfile ENV PYTHON_GET_PIP_URL https://raw.githubusercontent.com/pypa/get-pip/${PYTHON_PIP_VERSION}/get-pip.py ENV PYTHON_GET_PIP_SHA256 6a0b13826862f33c13b614a921d36253bfa1ae779c5fbf569876f3585057e9d2 -|||||||| 0559964:3.10-rc/alpine3.12/Dockerfile -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 -======== -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/b60e2320d9e8d02348525bd74e871e466afdf77c/get-pip.py -ENV PYTHON_GET_PIP_SHA256 c3b81e5d06371e135fb3156dc7d8fd6270735088428c4a9a5ec1f342e2024565 ->>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.10-rc/alpine3.12/Dockerfile RUN set -ex; \ \ @@ -165,182 +142,3 @@ RUN echo -e "Current Python version is $( python -V ) \n(found in $( which pytho echo -e "Current PIP version is $( pip -V ) \n(found in $( which pip ))." CMD ["python3"] -||||||| 0559964 -======= -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.13 - -# 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 - -# runtime dependencies -RUN set -eux; \ - apk add --no-cache \ -# install ca-certificates so that HTTPS works consistently - ca-certificates \ - ; -# other runtime dependencies for Python are installed later - -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.13 - -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 21.0.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/b60e2320d9e8d02348525bd74e871e466afdf77c/get-pip.py -ENV PYTHON_GET_PIP_SHA256 c3b81e5d06371e135fb3156dc7d8fd6270735088428c4a9a5ec1f342e2024565 - -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"] ->>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5 diff --git a/3.7/alpine3.13/Dockerfile b/3.7/alpine3.13/Dockerfile index 98a79c029..d810855fc 100644 --- a/3.7/alpine3.13/Dockerfile +++ b/3.7/alpine3.13/Dockerfile @@ -1,4 +1,3 @@ -<<<<<<< HEAD FROM danielschulz/alpine:3.13.1 @@ -21,20 +20,12 @@ RUN set -eux; \ ; # other runtime dependencies for Python are installed later -<<<<<<<< HEAD:3.7/alpine3.13/Dockerfile # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" ARG CPYTHON_GIT_REFERENCE="v3.7.256rc" ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} -|||||||| 0559964:3.8/alpine3.12/Dockerfile -ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.8.6 -======== -ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.8.8 ->>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.8/alpine3.12/Dockerfile RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ @@ -122,24 +113,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 ''" -<<<<<<<< HEAD:3.7/alpine3.13/Dockerfile ENV PYTHON_PIP_VERSION 20.3.3 -|||||||| 0559964:3.8/alpine3.12/Dockerfile -ENV PYTHON_PIP_VERSION 20.3.1 -======== -ENV PYTHON_PIP_VERSION 21.0.1 ->>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.8/alpine3.12/Dockerfile # https://github.com/pypa/get-pip -<<<<<<<< HEAD:3.7/alpine3.13/Dockerfile ENV PYTHON_GET_PIP_URL https://raw.githubusercontent.com/pypa/get-pip/${PYTHON_PIP_VERSION}/get-pip.py ENV PYTHON_GET_PIP_SHA256 6a0b13826862f33c13b614a921d36253bfa1ae779c5fbf569876f3585057e9d2 -|||||||| 0559964:3.8/alpine3.12/Dockerfile -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 -======== -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/b60e2320d9e8d02348525bd74e871e466afdf77c/get-pip.py -ENV PYTHON_GET_PIP_SHA256 c3b81e5d06371e135fb3156dc7d8fd6270735088428c4a9a5ec1f342e2024565 ->>>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.8/alpine3.12/Dockerfile RUN set -ex; \ \ @@ -165,183 +142,3 @@ RUN echo -e "Current Python version is $( python -V ) \n(found in $( which pytho echo -e "Current PIP version is $( pip -V ) \n(found in $( which pip ))." CMD ["python3"] -||||||| 0559964 -======= -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.13 - -# 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 - -# runtime dependencies -RUN set -eux; \ - apk add --no-cache \ -# install ca-certificates so that HTTPS works consistently - ca-certificates \ - ; -# other runtime dependencies for Python are installed later - -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.7.10 - -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 21.0.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/b60e2320d9e8d02348525bd74e871e466afdf77c/get-pip.py -ENV PYTHON_GET_PIP_SHA256 c3b81e5d06371e135fb3156dc7d8fd6270735088428c4a9a5ec1f342e2024565 - -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"] ->>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5 diff --git a/3.8/alpine3.13/Dockerfile b/3.8/alpine3.13/Dockerfile index b49df6ca8..9569bd66a 100644 --- a/3.8/alpine3.13/Dockerfile +++ b/3.8/alpine3.13/Dockerfile @@ -1,14 +1,8 @@ -<<<<<<< HEAD:3.8/alpine3.13/Dockerfile FROM danielschulz/alpine:3.13.1 LABEL BUILD_TIME_PYTHON="20210210_1843 UTC" \ MAINTAINER="Daniel Schulz " -||||||| 0559964:3.8/alpine3.11/Dockerfile -FROM alpine:3.11 -======= -FROM alpine:3.13 ->>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.8/alpine3.11/Dockerfile # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} @@ -27,20 +21,12 @@ RUN set -eux; \ ; # other runtime dependencies for Python are installed later -<<<<<<< HEAD:3.8/alpine3.13/Dockerfile # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" ARG CPYTHON_GIT_REFERENCE="v3.8.256rc" ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} -||||||| 0559964:3.8/alpine3.11/Dockerfile -ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.8.6 -======= -ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.8.8 ->>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.8/alpine3.11/Dockerfile RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ @@ -128,24 +114,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 ''" -<<<<<<< HEAD:3.8/alpine3.13/Dockerfile ENV PYTHON_PIP_VERSION 20.3.3 -||||||| 0559964:3.8/alpine3.11/Dockerfile -ENV PYTHON_PIP_VERSION 20.3.1 -======= -ENV PYTHON_PIP_VERSION 21.0.1 ->>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.8/alpine3.11/Dockerfile # https://github.com/pypa/get-pip -<<<<<<< HEAD:3.8/alpine3.13/Dockerfile ENV PYTHON_GET_PIP_URL https://raw.githubusercontent.com/pypa/get-pip/${PYTHON_PIP_VERSION}/get-pip.py ENV PYTHON_GET_PIP_SHA256 6a0b13826862f33c13b614a921d36253bfa1ae779c5fbf569876f3585057e9d2 -||||||| 0559964:3.8/alpine3.11/Dockerfile -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py -ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7 -======= -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/b60e2320d9e8d02348525bd74e871e466afdf77c/get-pip.py -ENV PYTHON_GET_PIP_SHA256 c3b81e5d06371e135fb3156dc7d8fd6270735088428c4a9a5ec1f342e2024565 ->>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5:3.8/alpine3.11/Dockerfile RUN set -ex; \ \ diff --git a/3.9/alpine3.13/Dockerfile b/3.9/alpine3.13/Dockerfile index 3c7c087f4..9f2f7f1b3 100644 --- a/3.9/alpine3.13/Dockerfile +++ b/3.9/alpine3.13/Dockerfile @@ -1,4 +1,3 @@ -<<<<<<< HEAD FROM danielschulz/alpine:3.13.1 @@ -144,148 +143,3 @@ RUN echo -e "Current Python version is $( python -V ) \n(found in $( which pytho echo -e "Current PIP version is $( pip -V ) \n(found in $( which pip ))." CMD ["python3"] -||||||| 0559964 -======= -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.13 - -# 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 - -# runtime dependencies -RUN set -eux; \ - apk add --no-cache \ -# install ca-certificates so that HTTPS works consistently - ca-certificates \ -# and tzdata for PEP 615 (https://www.python.org/dev/peps/pep-0615/) - tzdata \ - ; -# other runtime dependencies for Python are installed later - -ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.9.2 - -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" \ - && 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 '{}' + \ - \ - && 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 21.0.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/b60e2320d9e8d02348525bd74e871e466afdf77c/get-pip.py -ENV PYTHON_GET_PIP_SHA256 c3b81e5d06371e135fb3156dc7d8fd6270735088428c4a9a5ec1f342e2024565 - -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"] ->>>>>>> ec67f96b61c55ba35acd6c553f21641c5bf0ccc5 From 3fcabea259b32eb4ac83a9f53f72df2cb200e972 Mon Sep 17 00:00:00 2001 From: Daniel Schulz Date: Wed, 3 Mar 2021 17:05:25 +0100 Subject: [PATCH 17/19] updated versions Signed-off-by: Daniel Schulz --- 3.10-rc/alpine3.13/Dockerfile | 6 +++--- 3.7/alpine3.13/Dockerfile | 7 ++++--- 3.8/alpine3.13/Dockerfile | 6 +++--- 3.9/alpine3.13/Dockerfile | 6 +++--- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/3.10-rc/alpine3.13/Dockerfile b/3.10-rc/alpine3.13/Dockerfile index e2c4655b8..1cf43910f 100644 --- a/3.10-rc/alpine3.13/Dockerfile +++ b/3.10-rc/alpine3.13/Dockerfile @@ -1,7 +1,7 @@ -FROM danielschulz/alpine:3.13.1 +FROM danielschulz/rust-on-alpine:3.13 -LABEL BUILD_TIME_PYTHON="20210210_1843 UTC" \ +LABEL BUILD_TIME_PYTHON="20210303_1425 UTC" \ MAINTAINER="Daniel Schulz " # ensure local python is preferred over distribution python @@ -23,7 +23,7 @@ RUN set -eux; \ # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="v3.10.256a_20201228_1455" +ARG CPYTHON_GIT_REFERENCE="master" ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} diff --git a/3.7/alpine3.13/Dockerfile b/3.7/alpine3.13/Dockerfile index d810855fc..d94645a75 100644 --- a/3.7/alpine3.13/Dockerfile +++ b/3.7/alpine3.13/Dockerfile @@ -1,8 +1,9 @@ -FROM danielschulz/alpine:3.13.1 +FROM danielschulz/rust-on-alpine:3.13 -LABEL BUILD_TIME_PYTHON="20210210_1843 UTC" \ +LABEL BUILD_TIME_PYTHON="20210303_1425 UTC" \ MAINTAINER="Daniel Schulz " + # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:${PATH} @@ -22,7 +23,7 @@ RUN set -eux; \ # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="v3.7.256rc" +ARG CPYTHON_GIT_REFERENCE="3.7" ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} diff --git a/3.8/alpine3.13/Dockerfile b/3.8/alpine3.13/Dockerfile index 9569bd66a..40cad2815 100644 --- a/3.8/alpine3.13/Dockerfile +++ b/3.8/alpine3.13/Dockerfile @@ -1,7 +1,7 @@ -FROM danielschulz/alpine:3.13.1 +FROM danielschulz/rust-on-alpine:3.13 -LABEL BUILD_TIME_PYTHON="20210210_1843 UTC" \ +LABEL BUILD_TIME_PYTHON="20210303_1425 UTC" \ MAINTAINER="Daniel Schulz " # ensure local python is preferred over distribution python @@ -23,7 +23,7 @@ RUN set -eux; \ # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="v3.8.256rc" +ARG CPYTHON_GIT_REFERENCE="3.8" ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} diff --git a/3.9/alpine3.13/Dockerfile b/3.9/alpine3.13/Dockerfile index 9f2f7f1b3..9e7a0f56b 100644 --- a/3.9/alpine3.13/Dockerfile +++ b/3.9/alpine3.13/Dockerfile @@ -1,7 +1,7 @@ -FROM danielschulz/alpine:3.13.1 +FROM danielschulz/rust-on-alpine:3.13 -LABEL BUILD_TIME_PYTHON="20210210_1843 UTC" \ +LABEL BUILD_TIME_PYTHON="20210303_1425 UTC" \ MAINTAINER="Daniel Schulz " # ensure local python is preferred over distribution python @@ -23,7 +23,7 @@ RUN set -eux; \ # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="v3.9.256rc" +ARG CPYTHON_GIT_REFERENCE="3.9" ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} From 0fa4e11eb72a19bd47ca8a6673b9293cb417bd55 Mon Sep 17 00:00:00 2001 From: Daniel Schulz Date: Wed, 3 Mar 2021 20:51:58 +0100 Subject: [PATCH 18/19] updated versions Signed-off-by: Daniel Schulz --- 3.10-rc/alpine3.13/Dockerfile | 4 ++-- 3.7/alpine3.13/Dockerfile | 4 ++-- 3.8/alpine3.13/Dockerfile | 4 ++-- 3.9/alpine3.13/Dockerfile | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/3.10-rc/alpine3.13/Dockerfile b/3.10-rc/alpine3.13/Dockerfile index 1cf43910f..ebc27a91b 100644 --- a/3.10-rc/alpine3.13/Dockerfile +++ b/3.10-rc/alpine3.13/Dockerfile @@ -1,5 +1,5 @@ -FROM danielschulz/rust-on-alpine:3.13 +FROM danielschulz/alpine:3.13 LABEL BUILD_TIME_PYTHON="20210303_1425 UTC" \ MAINTAINER="Daniel Schulz " @@ -23,7 +23,7 @@ RUN set -eux; \ # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="master" +ARG CPYTHON_GIT_REFERENCE="3.10-rc_20210303" ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} diff --git a/3.7/alpine3.13/Dockerfile b/3.7/alpine3.13/Dockerfile index d94645a75..3e6cd608f 100644 --- a/3.7/alpine3.13/Dockerfile +++ b/3.7/alpine3.13/Dockerfile @@ -1,5 +1,5 @@ -FROM danielschulz/rust-on-alpine:3.13 +FROM danielschulz/alpine:3.13 LABEL BUILD_TIME_PYTHON="20210303_1425 UTC" \ MAINTAINER="Daniel Schulz " @@ -23,7 +23,7 @@ RUN set -eux; \ # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="3.7" +ARG CPYTHON_GIT_REFERENCE="3.7_20210303" ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} diff --git a/3.8/alpine3.13/Dockerfile b/3.8/alpine3.13/Dockerfile index 40cad2815..bfb6c2673 100644 --- a/3.8/alpine3.13/Dockerfile +++ b/3.8/alpine3.13/Dockerfile @@ -1,5 +1,5 @@ -FROM danielschulz/rust-on-alpine:3.13 +FROM danielschulz/alpine:3.13 LABEL BUILD_TIME_PYTHON="20210303_1425 UTC" \ MAINTAINER="Daniel Schulz " @@ -23,7 +23,7 @@ RUN set -eux; \ # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="3.8" +ARG CPYTHON_GIT_REFERENCE="3.8_20210303" ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} diff --git a/3.9/alpine3.13/Dockerfile b/3.9/alpine3.13/Dockerfile index 9e7a0f56b..cf76be580 100644 --- a/3.9/alpine3.13/Dockerfile +++ b/3.9/alpine3.13/Dockerfile @@ -1,5 +1,5 @@ -FROM danielschulz/rust-on-alpine:3.13 +FROM danielschulz/alpine:3.13 LABEL BUILD_TIME_PYTHON="20210303_1425 UTC" \ MAINTAINER="Daniel Schulz " @@ -23,7 +23,7 @@ RUN set -eux; \ # use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" -ARG CPYTHON_GIT_REFERENCE="3.9" +ARG CPYTHON_GIT_REFERENCE="3.9_20210303" ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} ENV PYTHON_VERSION=${PYTHON_VERSION} From 5020d43d1c53eac0c7cf1889cda372c2fc729479 Mon Sep 17 00:00:00 2001 From: Daniel Schulz Date: Thu, 4 Mar 2021 22:11:27 +0100 Subject: [PATCH 19/19] added Python, Docker and DinD images Signed-off-by: Daniel Schulz --- 3.9/docker/docker_20-10/Dockerfile | 64 ++++++ 3.9/docker/docker_20-10/alpine3.13/Dockerfile | 142 +++++++++++++ .../docker_20-10/dind-rootless/Dockerfile | 47 +++++ 3.9/docker/docker_20-10/dind/Dockerfile | 49 +++++ .../docker_20-10/dind/dockerd-entrypoint.sh | 186 ++++++++++++++++++ 3.9/docker/docker_20-10/docker-entrypoint.sh | 61 ++++++ 3.9/docker/docker_20-10/modprobe.sh | 20 ++ 3.9/notes_build.txt | 54 +++++ 3.9/notes_tagging.txt | 20 ++ 9 files changed, 643 insertions(+) create mode 100644 3.9/docker/docker_20-10/Dockerfile create mode 100644 3.9/docker/docker_20-10/alpine3.13/Dockerfile create mode 100644 3.9/docker/docker_20-10/dind-rootless/Dockerfile create mode 100644 3.9/docker/docker_20-10/dind/Dockerfile create mode 100755 3.9/docker/docker_20-10/dind/dockerd-entrypoint.sh create mode 100755 3.9/docker/docker_20-10/docker-entrypoint.sh create mode 100755 3.9/docker/docker_20-10/modprobe.sh create mode 100644 3.9/notes_build.txt create mode 100644 3.9/notes_tagging.txt diff --git a/3.9/docker/docker_20-10/Dockerfile b/3.9/docker/docker_20-10/Dockerfile new file mode 100644 index 000000000..71feaa45d --- /dev/null +++ b/3.9/docker/docker_20-10/Dockerfile @@ -0,0 +1,64 @@ + +FROM danielschulz/alpine:3.13 + +RUN apk add --no-cache \ + ca-certificates \ + openssh-client +# DOCKER_HOST=ssh://... -- https://github.com/docker/cli/pull/1014 + +# set up nsswitch.conf for Go's "netgo" implementation (which Docker explicitly uses) +# - https://github.com/docker/docker-ce/blob/v17.09.0-ce/components/engine/hack/make.sh#L149 +# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275 +# - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf +RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf + +ENV DOCKER_VERSION 20.10.5 +# TODO ENV DOCKER_SHA256 +# https://github.com/docker/docker-ce/blob/5b073ee2cf564edee5adca05eee574142f7627bb/components/packaging/static/hash_files !! +# (no SHA file artifacts on download.docker.com yet as of 2017-06-07 though) + +RUN set -eux; \ + \ + apkArch="$(apk --print-arch)"; \ + case "$apkArch" in \ + 'x86_64') \ + url='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.5.tgz'; \ + ;; \ + 'armhf') \ + url='https://download.docker.com/linux/static/stable/armel/docker-20.10.5.tgz'; \ + ;; \ + 'armv7') \ + url='https://download.docker.com/linux/static/stable/armhf/docker-20.10.5.tgz'; \ + ;; \ + 'aarch64') \ + url='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.5.tgz'; \ + ;; \ + *) echo >&2 "error: unsupported architecture (${apkArch})"; exit 1 ;; \ + esac; \ + \ + wget -O docker.tgz "${url}"; \ + \ + tar --extract \ + --file docker.tgz \ + --strip-components 1 \ + --directory /usr/local/bin/ \ + ; \ + rm docker.tgz; \ + \ + dockerd --version; \ + docker --version + +COPY modprobe.sh /usr/local/bin/modprobe +COPY docker-entrypoint.sh /usr/local/bin/ + +# https://github.com/docker-library/docker/pull/166 +# dockerd-entrypoint.sh uses DOCKER_TLS_CERTDIR for auto-generating TLS certificates +# docker-entrypoint.sh uses DOCKER_TLS_CERTDIR for auto-setting DOCKER_TLS_VERIFY and DOCKER_CERT_PATH +# (For this to work, at least the "client" subdirectory of this path needs to be shared between the client and server containers via a volume, "docker cp", or other means of data sharing.) +ENV DOCKER_TLS_CERTDIR=/certs +# also, ensure the directory pre-exists and has wide enough permissions for "dockerd-entrypoint.sh" to create subdirectories, even when run in "rootless" mode +RUN mkdir /certs /certs/client && chmod 1777 /certs /certs/client +# (doing both /certs and /certs/client so that if Docker does a "copy-up" into a volume defined on /certs/client, it will "do the right thing" by default in a way that still works for rootless users) + +ENTRYPOINT ["docker-entrypoint.sh"] +CMD ["sh"] diff --git a/3.9/docker/docker_20-10/alpine3.13/Dockerfile b/3.9/docker/docker_20-10/alpine3.13/Dockerfile new file mode 100644 index 000000000..02c137836 --- /dev/null +++ b/3.9/docker/docker_20-10/alpine3.13/Dockerfile @@ -0,0 +1,142 @@ + +FROM danielschulz/docker-in-docker:20.10.5-dind + +# 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 + +# runtime dependencies +RUN set -eux; \ + apk add --no-cache \ +# install ca-certificates so that HTTPS works consistently + ca-certificates \ +# and tzdata for PEP 615 (https://www.python.org/dev/peps/pep-0615/) + tzdata \ + ; +# other runtime dependencies for Python are installed later + +# use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10) +ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git" +ARG CPYTHON_GIT_REFERENCE="3.9_20210303" +ARG PYTHON_VERSION=${CPYTHON_GIT_REFERENCE} + +ENV PYTHON_VERSION=${PYTHON_VERSION} + +RUN set -ex \ + && apk add --no-cache --virtual .fetch-deps \ + gnupg \ + tar \ + xz \ + git \ + \ + && mkdir -p /usr/src/python \ + && time git clone \ + -b ${CPYTHON_GIT_REFERENCE} \ + --depth 1 \ + --single-branch \ + --recurse-submodules ${CPYTHON_GIT_URI} \ + /usr/src/python \ + && rm -rf /usr/src/python/.git \ + && 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 --ignore=1 )" \ +# 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" \ + && 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 '{}' + \ + \ + && 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.3.3 +# https://github.com/pypa/get-pip +ENV PYTHON_GET_PIP_URL https://raw.githubusercontent.com/pypa/get-pip/${PYTHON_PIP_VERSION}/get-pip.py +ENV PYTHON_GET_PIP_SHA256 6a0b13826862f33c13b614a921d36253bfa1ae779c5fbf569876f3585057e9d2 + +RUN set -ex; \ + \ + wget -q -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 + +RUN echo -e "Current Python version is $( python -V ) \n(found in $( which python ))." && \ + echo -e "Current PIP version is $( pip -V ) \n(found in $( which pip ))." + +CMD ["python3"] diff --git a/3.9/docker/docker_20-10/dind-rootless/Dockerfile b/3.9/docker/docker_20-10/dind-rootless/Dockerfile new file mode 100644 index 000000000..4007e7139 --- /dev/null +++ b/3.9/docker/docker_20-10/dind-rootless/Dockerfile @@ -0,0 +1,47 @@ + +FROM danielschulz/docker-dind-python:3.9 + +# busybox "ip" is insufficient: +# [rootlesskit:child ] error: executing [[ip tuntap add name tap0 mode tap] [ip link set tap0 address 02:50:00:00:00:01]]: exit status 1 +RUN apk add --no-cache iproute2 + +# "/run/user/UID" will be used by default as the value of XDG_RUNTIME_DIR +RUN mkdir /run/user && chmod 1777 /run/user + +# create a default user preconfigured for running rootless dockerd +RUN set -eux; \ + adduser -h /home/rootless -g 'Rootless' -D -u 1000 rootless; \ + echo 'rootless:100000:65536' >> /etc/subuid; \ + echo 'rootless:100000:65536' >> /etc/subgid + +RUN set -eux; \ + \ + apkArch="$(apk --print-arch)"; \ + case "${apkArch}" in \ + 'x86_64') \ + url='https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-20.10.5.tgz'; \ + ;; \ + *) echo >&2 "error: unsupported architecture (${apkArch})"; exit 1 ;; \ + esac; \ + \ + wget -O rootless.tgz "${url}"; \ + \ + tar --extract \ + --file rootless.tgz \ + --strip-components 1 \ + --directory /usr/local/bin/ \ + 'docker-rootless-extras/rootlesskit' \ + 'docker-rootless-extras/rootlesskit-docker-proxy' \ + 'docker-rootless-extras/vpnkit' \ + ; \ + rm rootless.tgz; \ + \ + rootlesskit --version; \ + vpnkit --version + +# pre-create "/var/lib/docker" for our rootless user +RUN set -eux; \ + mkdir -p /home/rootless/.local/share/docker; \ + chown -R rootless:rootless /home/rootless/.local/share/docker +VOLUME /home/rootless/.local/share/docker +USER rootless diff --git a/3.9/docker/docker_20-10/dind/Dockerfile b/3.9/docker/docker_20-10/dind/Dockerfile new file mode 100644 index 000000000..ce6df772d --- /dev/null +++ b/3.9/docker/docker_20-10/dind/Dockerfile @@ -0,0 +1,49 @@ + +FROM danielschulz/docker:20.10.5 + +# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies +RUN set -eux; \ + apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + shadow-uidmap \ + xfsprogs \ + xz \ +# pigz: https://github.com/moby/moby/pull/35697 (faster gzip implementation) + pigz \ + git \ + ; \ +# only install zfs if it's available for the current architecture +# https://git.alpinelinux.org/cgit/aports/tree/main/zfs/APKBUILD?h=3.6-stable#n9 ("all !armhf !ppc64le" as of 2017-11-01) +# "apk info XYZ" exits with a zero exit code but no output when the package exists but not for this arch + if zfs="$(apk info --no-cache --quiet zfs)" && [ -n "${zfs}" ]; then \ + apk add --no-cache zfs; \ + fi + +# TODO aufs-tools + +# set up subuid/subgid so that "--userns-remap=default" works out-of-the-box +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:165536:65536' >> /etc/subuid; \ + echo 'dockremap:165536:65536' >> /etc/subgid + +# https://github.com/docker/docker/tree/master/hack/dind +ENV DIND_COMMIT ed89041433a031cafc0a0f19cfe573c31688d377 + +RUN set -eux; \ + wget -O /usr/local/bin/dind "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind"; \ + chmod +x /usr/local/bin/dind + +COPY dockerd-entrypoint.sh /usr/local/bin/ + +VOLUME /var/lib/docker +EXPOSE 2375 2376 + +ENTRYPOINT ["dockerd-entrypoint.sh"] +CMD [] diff --git a/3.9/docker/docker_20-10/dind/dockerd-entrypoint.sh b/3.9/docker/docker_20-10/dind/dockerd-entrypoint.sh new file mode 100755 index 000000000..d5f59fa9e --- /dev/null +++ b/3.9/docker/docker_20-10/dind/dockerd-entrypoint.sh @@ -0,0 +1,186 @@ +#!/bin/sh +set -eu + +_tls_ensure_private() { + local f="$1"; shift + [ -s "$f" ] || openssl genrsa -out "$f" 4096 +} +_tls_san() { + { + ip -oneline address | awk '{ gsub(/\/.+$/, "", $4); print "IP:" $4 }' + { + cat /etc/hostname + echo 'docker' + echo 'localhost' + hostname -f + hostname -s + } | sed 's/^/DNS:/' + [ -z "${DOCKER_TLS_SAN:-}" ] || echo "$DOCKER_TLS_SAN" + } | sort -u | xargs printf '%s,' | sed "s/,\$//" +} +_tls_generate_certs() { + local dir="$1"; shift + + # if ca/key.pem || !ca/cert.pem, generate CA public if necessary + # if ca/key.pem, generate server public + # if ca/key.pem, generate client public + # (regenerating public certs every startup to account for SAN/IP changes and/or expiration) + + # https://github.com/FiloSottile/mkcert/issues/174 + local certValidDays='825' + + if [ -s "$dir/ca/key.pem" ] || [ ! -s "$dir/ca/cert.pem" ]; then + # if we either have a CA private key or do *not* have a CA public key, then we should create/manage the CA + mkdir -p "$dir/ca" + _tls_ensure_private "$dir/ca/key.pem" + openssl req -new -key "$dir/ca/key.pem" \ + -out "$dir/ca/cert.pem" \ + -subj '/CN=docker:dind CA' -x509 -days "$certValidDays" + fi + + if [ -s "$dir/ca/key.pem" ]; then + # if we have a CA private key, we should create/manage a server key + mkdir -p "$dir/server" + _tls_ensure_private "$dir/server/key.pem" + openssl req -new -key "$dir/server/key.pem" \ + -out "$dir/server/csr.pem" \ + -subj '/CN=docker:dind server' + cat > "$dir/server/openssl.cnf" <<-EOF + [ x509_exts ] + subjectAltName = $(_tls_san) + EOF + openssl x509 -req \ + -in "$dir/server/csr.pem" \ + -CA "$dir/ca/cert.pem" \ + -CAkey "$dir/ca/key.pem" \ + -CAcreateserial \ + -out "$dir/server/cert.pem" \ + -days "$certValidDays" \ + -extfile "$dir/server/openssl.cnf" \ + -extensions x509_exts + cp "$dir/ca/cert.pem" "$dir/server/ca.pem" + openssl verify -CAfile "$dir/server/ca.pem" "$dir/server/cert.pem" + fi + + if [ -s "$dir/ca/key.pem" ]; then + # if we have a CA private key, we should create/manage a client key + mkdir -p "$dir/client" + _tls_ensure_private "$dir/client/key.pem" + chmod 0644 "$dir/client/key.pem" # openssl defaults to 0600 for the private key, but this one needs to be shared with arbitrary client contexts + openssl req -new \ + -key "$dir/client/key.pem" \ + -out "$dir/client/csr.pem" \ + -subj '/CN=docker:dind client' + cat > "$dir/client/openssl.cnf" <<-'EOF' + [ x509_exts ] + extendedKeyUsage = clientAuth + EOF + openssl x509 -req \ + -in "$dir/client/csr.pem" \ + -CA "$dir/ca/cert.pem" \ + -CAkey "$dir/ca/key.pem" \ + -CAcreateserial \ + -out "$dir/client/cert.pem" \ + -days "$certValidDays" \ + -extfile "$dir/client/openssl.cnf" \ + -extensions x509_exts + cp "$dir/ca/cert.pem" "$dir/client/ca.pem" + openssl verify -CAfile "$dir/client/ca.pem" "$dir/client/cert.pem" + fi +} + +# no arguments passed +# or first arg is `-f` or `--some-option` +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + # set "dockerSocket" to the default "--host" *unix socket* value (for both standard or rootless) + uid="$(id -u)" + if [ "$uid" = '0' ]; then + dockerSocket='unix:///var/run/docker.sock' + else + # if we're not root, we must be trying to run rootless + : "${XDG_RUNTIME_DIR:=/run/user/$uid}" + dockerSocket="unix://$XDG_RUNTIME_DIR/docker.sock" + fi + case "${DOCKER_HOST:-}" in + unix://*) + dockerSocket="$DOCKER_HOST" + ;; + esac + + # add our default arguments + if [ -n "${DOCKER_TLS_CERTDIR:-}" ] \ + && _tls_generate_certs "$DOCKER_TLS_CERTDIR" \ + && [ -s "$DOCKER_TLS_CERTDIR/server/ca.pem" ] \ + && [ -s "$DOCKER_TLS_CERTDIR/server/cert.pem" ] \ + && [ -s "$DOCKER_TLS_CERTDIR/server/key.pem" ] \ + ; then + # generate certs and use TLS if requested/possible (default in 19.03+) + set -- dockerd \ + --host="$dockerSocket" \ + --host=tcp://0.0.0.0:2376 \ + --tlsverify \ + --tlscacert "$DOCKER_TLS_CERTDIR/server/ca.pem" \ + --tlscert "$DOCKER_TLS_CERTDIR/server/cert.pem" \ + --tlskey "$DOCKER_TLS_CERTDIR/server/key.pem" \ + "$@" + DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS="${DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS:-} -p 0.0.0.0:2376:2376/tcp" + else + # TLS disabled (-e DOCKER_TLS_CERTDIR='') or missing certs + set -- dockerd \ + --host="$dockerSocket" \ + --host=tcp://0.0.0.0:2375 \ + "$@" + DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS="${DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS:-} -p 0.0.0.0:2375:2375/tcp" + fi +fi + +if [ "$1" = 'dockerd' ]; then + # explicitly remove Docker's default PID file to ensure that it can start properly if it was stopped uncleanly (and thus didn't clean up the PID file) + find /run /var/run -iname 'docker*.pid' -delete || : + + uid="$(id -u)" + if [ "$uid" != '0' ]; then + # if we're not root, we must be trying to run rootless + if ! command -v rootlesskit > /dev/null; then + echo >&2 "error: attempting to run rootless dockerd but missing 'rootlesskit' (perhaps the 'docker:dind-rootless' image variant is intended?)" + exit 1 + fi + user="$(id -un 2>/dev/null || :)" + if ! grep -qE "^($uid${user:+|$user}):" /etc/subuid || ! grep -qE "^($uid${user:+|$user}):" /etc/subgid; then + echo >&2 "error: attempting to run rootless dockerd but missing necessary entries in /etc/subuid and/or /etc/subgid for $uid" + exit 1 + fi + : "${XDG_RUNTIME_DIR:=/run/user/$uid}" + export XDG_RUNTIME_DIR + if ! mkdir -p "$XDG_RUNTIME_DIR" || [ ! -w "$XDG_RUNTIME_DIR" ] || ! mkdir -p "$HOME/.local/share/docker" || [ ! -w "$HOME/.local/share/docker" ]; then + echo >&2 "error: attempting to run rootless dockerd but need writable HOME ($HOME) and XDG_RUNTIME_DIR ($XDG_RUNTIME_DIR) for user $uid" + exit 1 + fi + if [ -f /proc/sys/kernel/unprivileged_userns_clone ] && unprivClone="$(cat /proc/sys/kernel/unprivileged_userns_clone)" && [ "$unprivClone" != '1' ]; then + echo >&2 "error: attempting to run rootless dockerd but need 'kernel.unprivileged_userns_clone' (/proc/sys/kernel/unprivileged_userns_clone) set to 1" + exit 1 + fi + if [ -f /proc/sys/user/max_user_namespaces ] && maxUserns="$(cat /proc/sys/user/max_user_namespaces)" && [ "$maxUserns" = '0' ]; then + echo >&2 "error: attempting to run rootless dockerd but need 'user.max_user_namespaces' (/proc/sys/user/max_user_namespaces) set to a sufficiently large value" + exit 1 + fi + # TODO overlay support detection? + exec rootlesskit \ + --net="${DOCKERD_ROOTLESS_ROOTLESSKIT_NET:-vpnkit}" \ + --mtu="${DOCKERD_ROOTLESS_ROOTLESSKIT_MTU:-1500}" \ + --disable-host-loopback \ + --port-driver=builtin \ + --copy-up=/etc \ + --copy-up=/run \ + ${DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS:-} \ + "$@" + elif [ -x '/usr/local/bin/dind' ]; then + # if we have the (mostly defunct now) Docker-in-Docker wrapper script, use it + set -- '/usr/local/bin/dind' "$@" + fi +else + # if it isn't `dockerd` we're trying to run, pass it through `docker-entrypoint.sh` so it gets `DOCKER_HOST` set appropriately too + set -- docker-entrypoint.sh "$@" +fi + +exec "$@" diff --git a/3.9/docker/docker_20-10/docker-entrypoint.sh b/3.9/docker/docker_20-10/docker-entrypoint.sh new file mode 100755 index 000000000..878c5fb83 --- /dev/null +++ b/3.9/docker/docker_20-10/docker-entrypoint.sh @@ -0,0 +1,61 @@ +#!/bin/sh +set -eu + +# first arg is `-f` or `--some-option` +if [ "${1#-}" != "$1" ]; then + set -- docker "$@" +fi + +# if our command is a valid Docker subcommand, let's invoke it through Docker instead +# (this allows for "docker run docker ps", etc) +if docker help "$1" > /dev/null 2>&1; then + set -- docker "$@" +fi + +_should_tls() { + [ -n "${DOCKER_TLS_CERTDIR:-}" ] \ + && [ -s "$DOCKER_TLS_CERTDIR/client/ca.pem" ] \ + && [ -s "$DOCKER_TLS_CERTDIR/client/cert.pem" ] \ + && [ -s "$DOCKER_TLS_CERTDIR/client/key.pem" ] +} + +# if we have no DOCKER_HOST but we do have the default Unix socket (standard or rootless), use it explicitly +if [ -z "${DOCKER_HOST:-}" ] && [ -S /var/run/docker.sock ]; then + export DOCKER_HOST=unix:///var/run/docker.sock +elif [ -z "${DOCKER_HOST:-}" ] && XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}" && [ -S "$XDG_RUNTIME_DIR/docker.sock" ]; then + export DOCKER_HOST="unix://$XDG_RUNTIME_DIR/docker.sock" +fi + +# if DOCKER_HOST isn't set (no custom setting, no default socket), let's set it to a sane remote value +if [ -z "${DOCKER_HOST:-}" ]; then + if _should_tls || [ -n "${DOCKER_TLS_VERIFY:-}" ]; then + export DOCKER_HOST='tcp://docker:2376' + else + export DOCKER_HOST='tcp://docker:2375' + fi +fi +if [ "${DOCKER_HOST#tcp:}" != "$DOCKER_HOST" ] \ + && [ -z "${DOCKER_TLS_VERIFY:-}" ] \ + && [ -z "${DOCKER_CERT_PATH:-}" ] \ + && _should_tls \ +; then + export DOCKER_TLS_VERIFY=1 + export DOCKER_CERT_PATH="$DOCKER_TLS_CERTDIR/client" +fi + +if [ "$1" = 'dockerd' ]; then + cat >&2 <<-'EOW' + + 📎 Hey there! It looks like you're trying to run a Docker daemon. + + You probably should use the "dind" image variant instead, something like: + + docker run --privileged --name some-docker ... danielschulz/docker-in-docker:20-dind ... + + See https://hub.docker.com/r/danielschulz/docker-in-docker/tags for more documentation and usage examples. + + EOW + sleep 3 +fi + +exec "$@" diff --git a/3.9/docker/docker_20-10/modprobe.sh b/3.9/docker/docker_20-10/modprobe.sh new file mode 100755 index 000000000..b357d893f --- /dev/null +++ b/3.9/docker/docker_20-10/modprobe.sh @@ -0,0 +1,20 @@ +#!/bin/sh +set -eu + +# "modprobe" without modprobe +# https://twitter.com/lucabruno/status/902934379835662336 + +# this isn't 100% fool-proof, but it'll have a much higher success rate than simply using the "real" modprobe + +# Docker often uses "modprobe -va foo bar baz" +# so we ignore modules that start with "-" +for module; do + if [ "${module#-}" = "$module" ]; then + ip link show "$module" || true + lsmod | grep "$module" || true + fi +done + +# remove /usr/local/... from PATH so we can exec the real modprobe as a last resort +export PATH='/usr/sbin:/usr/bin:/sbin:/bin' +exec modprobe "$@" diff --git a/3.9/notes_build.txt b/3.9/notes_build.txt new file mode 100644 index 000000000..d1dbd42a0 --- /dev/null +++ b/3.9/notes_build.txt @@ -0,0 +1,54 @@ + +cd /apps/home/daniel/CG/CGD/Engagements/ZKA/20210210/Python/3.9/docker/docker_20-10/ || exit 1; \ + time docker build -q --no-cache . \ + -f ./Dockerfile \ + --label DOCKER_VERSION="20.10.5" \ + --label DOCKER="Docker CLI and Daemon in version 20.10.5" \ + --label AUTHOR="Daniel Schulz" \ + --label UTC_BUILD_TIME_DOCKER="$( date -u +%Y%m%d_%H%M )" \ + -t danielschulz/docker:20.10.5 ; \ + docker tag danielschulz/docker:20.10.5 danielschulz/docker:20.10 ; \ + docker tag danielschulz/docker:20.10.5 danielschulz/docker:20 ; \ + echo $? + +cd /apps/home/daniel/CG/CGD/Engagements/ZKA/20210210/Python/3.9/docker/docker_20-10/dind/ || exit 1; \ + time docker build -q --no-cache . \ + -f ./Dockerfile \ + --label DOCKER_VERSION="20.10.5" \ + --label DIND="Docker in Docker (DinD) as user root in version 20.10.5" \ + --label AUTHOR="Daniel Schulz" \ + --label UTC_BUILD_TIME_DIND_ROOT="$( date -u +%Y%m%d_%H%M )" \ + -t danielschulz/docker-in-docker:20.10.5-dind ; \ + docker tag danielschulz/docker-in-docker:20.10.5-dind danielschulz/docker-in-docker:20.10-dind ; \ + docker tag danielschulz/docker-in-docker:20.10.5-dind danielschulz/docker-in-docker:20-dind ; \ + echo $? + + +cd /apps/home/daniel/CG/CGD/Engagements/ZKA/20210210/Python/3.9/docker/docker_20-10/alpine3.13/ || exit 1; \ + time docker build -q --no-cache . \ + -f ./Dockerfile \ + --label DIND="Docker in Docker (DinD) as user root in version 20.10.5 w/ Python 3.9.256" \ + --label DOCKER_VERSION="20.10.5" \ + --label PYTHON_VERSION="3.9.256" \ + --label AUTHOR="Daniel Schulz" \ + --label UTC_BUILD_TIME_DIND_ROOT="$( date -u +%Y%m%d_%H%M )" \ + -t danielschulz/docker-dind-python:3.9 ; \ + docker tag danielschulz/docker-dind-python:3.9 danielschulz/docker-dind_20_10_5-python:3.9 ; \ + docker tag danielschulz/docker-dind-python:3.9 danielschulz/docker-dind_20_10-python:3.9 ; \ + docker tag danielschulz/docker-dind-python:3.9 danielschulz/docker-dind_20-python:3.9 ; \ + echo $? + + +cd /apps/home/daniel/CG/CGD/Engagements/ZKA/20210210/Python/3.9/docker/docker_20-10/dind-rootless/ || exit 1; \ + time docker build -q --no-cache . \ + -f ./Dockerfile \ + --label DOCKER_VERSION="20.10.5" \ + --label PYTHON_VERSION="3.9.256" \ + --label DIND_ROOTLESS="Docker in Docker (DinD) rootless in version 20.10.5 w/ Python 3.9.256" \ + --label AUTHOR="Daniel Schulz" \ + --label UTC_BUILD_TIME_DIND_ROOTLESS="$( date -u +%Y%m%d_%H%M )" \ + -t danielschulz/docker-in-docker-20.10.5-dind-rootless-python:3.9 ; \ + docker tag danielschulz/docker-in-docker-20.10.5-dind-rootless-python:3.9 danielschulz/docker-in-docker-20.10-dind-rootless-python:3.9 ; \ + docker tag danielschulz/docker-in-docker-20.10.5-dind-rootless-python:3.9 danielschulz/docker-in-docker-20-dind-rootless-python:3.9 ; \ + echo $? + diff --git a/3.9/notes_tagging.txt b/3.9/notes_tagging.txt new file mode 100644 index 000000000..6a59aa461 --- /dev/null +++ b/3.9/notes_tagging.txt @@ -0,0 +1,20 @@ + +time docker push danielschulz/docker:20.10.5 ; echo $? +time docker push danielschulz/docker:20.10 ; echo $? +time docker push danielschulz/docker:20 ; echo $? + + +time docker push danielschulz/docker-in-docker:20.10.5-dind ; echo $? +time docker push danielschulz/docker-in-docker:20.10-dind ; echo $? +time docker push danielschulz/docker-in-docker:20-dind ; echo $? + + +time docker push danielschulz/docker-dind-python:3.9 ; echo $? +time docker push danielschulz/docker-dind_20_10_5-python:3.9 ; echo $? +time docker push danielschulz/docker-dind_20_10-python:3.9 ; echo $? +time docker push danielschulz/docker-dind_20-python:3.9 ; echo $? + + +time docker push danielschulz/docker-in-docker-20.10.5-dind-rootless-python:3.9 ; echo $? +time docker push danielschulz/docker-in-docker-20.10-dind-rootless-python:3.9 ; echo $? +time docker push danielschulz/docker-in-docker-20-dind-rootless-python:3.9 ; echo $?