-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Update python #11763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Update python #11763
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changes: - docker-library/python@2c9debd: Merge pull request docker-library/python#686 from vikahl/dynamically-load-setuptools-pip - docker-library/python@bc88926: Dynamically load Setuptools and Pip versions from ensurepip - docker-library/python@d27f3d2: Merge pull request docker-library/python#687 from infosiftr/jq-template - docker-library/python@c484e1b: Add initial jq-based templating engine
20a9fde
to
0d1de88
Compare
Diff for 0d1de88:diff --git a/_bashbrew-cat b/_bashbrew-cat
index 91a90af..180d20c 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -3,182 +3,197 @@ GitRepo: https://github.com/docker-library/python.git
Tags: 3.7.12-alpine3.14, 3.7-alpine3.14
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: a7655831c15e823dffd1c895e87d66edfeadebb7
+GitCommit: c484e1ba82213c6a2e8785342630e5383d943d02
Directory: 3.7/alpine3.14
Tags: 3.7.12-alpine3.15, 3.7-alpine3.15, 3.7.12-alpine, 3.7-alpine
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: b739aec8401a072f43ed5f5eec806e8cc1d1b106
+GitCommit: c484e1ba82213c6a2e8785342630e5383d943d02
Directory: 3.7/alpine3.15
Tags: 3.7.12-bullseye, 3.7-bullseye
SharedTags: 3.7.12, 3.7
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: a7655831c15e823dffd1c895e87d66edfeadebb7
+GitCommit: c484e1ba82213c6a2e8785342630e5383d943d02
Directory: 3.7/bullseye
Tags: 3.7.12-buster, 3.7-buster
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: a7655831c15e823dffd1c895e87d66edfeadebb7
+GitCommit: c484e1ba82213c6a2e8785342630e5383d943d02
Directory: 3.7/buster
Tags: 3.7.12-slim-bullseye, 3.7-slim-bullseye, 3.7.12-slim, 3.7-slim
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: a7655831c15e823dffd1c895e87d66edfeadebb7
-Directory: 3.7/bullseye/slim
+GitCommit: c484e1ba82213c6a2e8785342630e5383d943d02
+Directory: 3.7/slim-bullseye
Tags: 3.7.12-slim-buster, 3.7-slim-buster
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: a7655831c15e823dffd1c895e87d66edfeadebb7
-Directory: 3.7/buster/slim
+GitCommit: c484e1ba82213c6a2e8785342630e5383d943d02
+Directory: 3.7/slim-buster
Tags: 3.8.12-alpine3.14, 3.8-alpine3.14
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 9242c448c7e50d5671e53a393fc2c464683f35dd
+GitCommit: c484e1ba82213c6a2e8785342630e5383d943d02
Directory: 3.8/alpine3.14
Tags: 3.8.12-alpine3.15, 3.8-alpine3.15, 3.8.12-alpine, 3.8-alpine
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: b739aec8401a072f43ed5f5eec806e8cc1d1b106
+GitCommit: c484e1ba82213c6a2e8785342630e5383d943d02
Directory: 3.8/alpine3.15
Tags: 3.8.12-bullseye, 3.8-bullseye
SharedTags: 3.8.12, 3.8
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 9242c448c7e50d5671e53a393fc2c464683f35dd
+GitCommit: c484e1ba82213c6a2e8785342630e5383d943d02
Directory: 3.8/bullseye
Tags: 3.8.12-buster, 3.8-buster
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 9242c448c7e50d5671e53a393fc2c464683f35dd
+GitCommit: c484e1ba82213c6a2e8785342630e5383d943d02
Directory: 3.8/buster
Tags: 3.8.12-slim-bullseye, 3.8-slim-bullseye, 3.8.12-slim, 3.8-slim
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 9242c448c7e50d5671e53a393fc2c464683f35dd
-Directory: 3.8/bullseye/slim
+GitCommit: c484e1ba82213c6a2e8785342630e5383d943d02
+Directory: 3.8/slim-bullseye
Tags: 3.8.12-slim-buster, 3.8-slim-buster
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 9242c448c7e50d5671e53a393fc2c464683f35dd
-Directory: 3.8/buster/slim
+GitCommit: c484e1ba82213c6a2e8785342630e5383d943d02
+Directory: 3.8/slim-buster
Tags: 3.9.10-alpine3.14, 3.9-alpine3.14
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 6a2c0f48f011aa279a0c9190725fc84a220460bc
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
Directory: 3.9/alpine3.14
Tags: 3.9.10-alpine3.15, 3.9-alpine3.15, 3.9.10-alpine, 3.9-alpine
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 6a2c0f48f011aa279a0c9190725fc84a220460bc
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
Directory: 3.9/alpine3.15
Tags: 3.9.10-bullseye, 3.9-bullseye
SharedTags: 3.9.10, 3.9
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 6a2c0f48f011aa279a0c9190725fc84a220460bc
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
Directory: 3.9/bullseye
Tags: 3.9.10-buster, 3.9-buster
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 6a2c0f48f011aa279a0c9190725fc84a220460bc
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
Directory: 3.9/buster
Tags: 3.9.10-slim-bullseye, 3.9-slim-bullseye, 3.9.10-slim, 3.9-slim
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 6a2c0f48f011aa279a0c9190725fc84a220460bc
-Directory: 3.9/bullseye/slim
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
+Directory: 3.9/slim-bullseye
Tags: 3.9.10-slim-buster, 3.9-slim-buster
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 6a2c0f48f011aa279a0c9190725fc84a220460bc
-Directory: 3.9/buster/slim
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
+Directory: 3.9/slim-buster
Tags: 3.9.10-windowsservercore-1809, 3.9-windowsservercore-1809
SharedTags: 3.9.10-windowsservercore, 3.9-windowsservercore, 3.9.10, 3.9
Architectures: windows-amd64
-GitCommit: 6a2c0f48f011aa279a0c9190725fc84a220460bc
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
Directory: 3.9/windows/windowsservercore-1809
Constraints: windowsservercore-1809
Tags: 3.9.10-windowsservercore-ltsc2022, 3.9-windowsservercore-ltsc2022
SharedTags: 3.9.10-windowsservercore, 3.9-windowsservercore, 3.9.10, 3.9
Architectures: windows-amd64
-GitCommit: 6a2c0f48f011aa279a0c9190725fc84a220460bc
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
Directory: 3.9/windows/windowsservercore-ltsc2022
Constraints: windowsservercore-ltsc2022
Tags: 3.10.2-alpine3.14, 3.10-alpine3.14, 3-alpine3.14, alpine3.14
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: d7fa897e3d1c57cf144b6253ffb08a11b7a7511c
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
Directory: 3.10/alpine3.14
Tags: 3.10.2-alpine3.15, 3.10-alpine3.15, 3-alpine3.15, alpine3.15, 3.10.2-alpine, 3.10-alpine, 3-alpine, alpine
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: d7fa897e3d1c57cf144b6253ffb08a11b7a7511c
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
Directory: 3.10/alpine3.15
Tags: 3.10.2-bullseye, 3.10-bullseye, 3-bullseye, bullseye
SharedTags: 3.10.2, 3.10, 3, latest
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: d7fa897e3d1c57cf144b6253ffb08a11b7a7511c
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
Directory: 3.10/bullseye
Tags: 3.10.2-buster, 3.10-buster, 3-buster, buster
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: d7fa897e3d1c57cf144b6253ffb08a11b7a7511c
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
Directory: 3.10/buster
Tags: 3.10.2-slim-bullseye, 3.10-slim-bullseye, 3-slim-bullseye, slim-bullseye, 3.10.2-slim, 3.10-slim, 3-slim, slim
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: d7fa897e3d1c57cf144b6253ffb08a11b7a7511c
-Directory: 3.10/bullseye/slim
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
+Directory: 3.10/slim-bullseye
Tags: 3.10.2-slim-buster, 3.10-slim-buster, 3-slim-buster, slim-buster
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: d7fa897e3d1c57cf144b6253ffb08a11b7a7511c
-Directory: 3.10/buster/slim
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
+Directory: 3.10/slim-buster
Tags: 3.10.2-windowsservercore-1809, 3.10-windowsservercore-1809, 3-windowsservercore-1809, windowsservercore-1809
SharedTags: 3.10.2-windowsservercore, 3.10-windowsservercore, 3-windowsservercore, windowsservercore, 3.10.2, 3.10, 3, latest
Architectures: windows-amd64
-GitCommit: d7fa897e3d1c57cf144b6253ffb08a11b7a7511c
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
Directory: 3.10/windows/windowsservercore-1809
Constraints: windowsservercore-1809
Tags: 3.10.2-windowsservercore-ltsc2022, 3.10-windowsservercore-ltsc2022, 3-windowsservercore-ltsc2022, windowsservercore-ltsc2022
SharedTags: 3.10.2-windowsservercore, 3.10-windowsservercore, 3-windowsservercore, windowsservercore, 3.10.2, 3.10, 3, latest
Architectures: windows-amd64
-GitCommit: d7fa897e3d1c57cf144b6253ffb08a11b7a7511c
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
Directory: 3.10/windows/windowsservercore-ltsc2022
Constraints: windowsservercore-ltsc2022
+Tags: 3.11.0a4-alpine3.14, 3.11-rc-alpine3.14
+Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
+Directory: 3.11-rc/alpine3.14
+
Tags: 3.11.0a4-alpine3.15, 3.11-rc-alpine3.15, 3.11.0a4-alpine, 3.11-rc-alpine
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 475515049d39e26da9a169da9b098e6c578e8f51
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
Directory: 3.11-rc/alpine3.15
Tags: 3.11.0a4-bullseye, 3.11-rc-bullseye
SharedTags: 3.11.0a4, 3.11-rc
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 475515049d39e26da9a169da9b098e6c578e8f51
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
Directory: 3.11-rc/bullseye
+Tags: 3.11.0a4-buster, 3.11-rc-buster
+Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
+Directory: 3.11-rc/buster
+
Tags: 3.11.0a4-slim-bullseye, 3.11-rc-slim-bullseye, 3.11.0a4-slim, 3.11-rc-slim
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 475515049d39e26da9a169da9b098e6c578e8f51
-Directory: 3.11-rc/bullseye/slim
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
+Directory: 3.11-rc/slim-bullseye
+
+Tags: 3.11.0a4-slim-buster, 3.11-rc-slim-buster
+Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
+Directory: 3.11-rc/slim-buster
Tags: 3.11.0a4-windowsservercore-1809, 3.11-rc-windowsservercore-1809
SharedTags: 3.11.0a4-windowsservercore, 3.11-rc-windowsservercore, 3.11.0a4, 3.11-rc
Architectures: windows-amd64
-GitCommit: 475515049d39e26da9a169da9b098e6c578e8f51
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
Directory: 3.11-rc/windows/windowsservercore-1809
Constraints: windowsservercore-1809
Tags: 3.11.0a4-windowsservercore-ltsc2022, 3.11-rc-windowsservercore-ltsc2022
SharedTags: 3.11.0a4-windowsservercore, 3.11-rc-windowsservercore, 3.11.0a4, 3.11-rc
Architectures: windows-amd64
-GitCommit: 475515049d39e26da9a169da9b098e6c578e8f51
+GitCommit: bc889262ddb8a156020cc0df70a6eed88c609c99
Directory: 3.11-rc/windows/windowsservercore-ltsc2022
Constraints: windowsservercore-ltsc2022
diff --git a/_bashbrew-list b/_bashbrew-list
index f2727e6..c66088c 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -96,19 +96,25 @@ python:3.10.2-windowsservercore-1809
python:3.10.2-windowsservercore-ltsc2022
python:3.11-rc
python:3.11-rc-alpine
+python:3.11-rc-alpine3.14
python:3.11-rc-alpine3.15
python:3.11-rc-bullseye
+python:3.11-rc-buster
python:3.11-rc-slim
python:3.11-rc-slim-bullseye
+python:3.11-rc-slim-buster
python:3.11-rc-windowsservercore
python:3.11-rc-windowsservercore-1809
python:3.11-rc-windowsservercore-ltsc2022
python:3.11.0a4
python:3.11.0a4-alpine
+python:3.11.0a4-alpine3.14
python:3.11.0a4-alpine3.15
python:3.11.0a4-bullseye
+python:3.11.0a4-buster
python:3.11.0a4-slim
python:3.11.0a4-slim-bullseye
+python:3.11.0a4-slim-buster
python:3.11.0a4-windowsservercore
python:3.11.0a4-windowsservercore-1809
python:3.11.0a4-windowsservercore-ltsc2022
diff --git a/python_3.11-rc-alpine/Dockerfile b/python_3.11-rc-alpine/Dockerfile
index 46e8f00..029768d 100644
--- a/python_3.11-rc-alpine/Dockerfile
+++ b/python_3.11-rc-alpine/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -16,34 +16,20 @@ 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.11.0a4
-RUN set -ex \
- && apk add --no-cache --virtual .fetch-deps \
+RUN set -eux; \
+ \
+ apk add --no-cache --virtual .build-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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && 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 \
@@ -69,12 +55,22 @@ RUN set -ex \
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 \
+ 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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file 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 \
@@ -84,45 +80,53 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ 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 \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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' '{}' ';' \
+ 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 \
+ | xargs -rt apk add --no-network --virtual .python-rundeps \
+ ; \
+ apk del --no-network .build-deps; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
@@ -140,7 +144,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.11-rc-alpine/Dockerfile b/python_3.11-rc-alpine3.14/Dockerfile
similarity index 57%
copy from python_3.11-rc-alpine/Dockerfile
copy to python_3.11-rc-alpine3.14/Dockerfile
index 46e8f00..98e0872 100644
--- a/python_3.11-rc-alpine/Dockerfile
+++ b/python_3.11-rc-alpine3.14/Dockerfile
@@ -1,10 +1,10 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
-FROM alpine:3.15
+FROM alpine:3.14
# ensure local python is preferred over distribution python
ENV PATH /usr/local/bin:$PATH
@@ -16,34 +16,20 @@ 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.11.0a4
-RUN set -ex \
- && apk add --no-cache --virtual .fetch-deps \
+RUN set -eux; \
+ \
+ apk add --no-cache --virtual .build-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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && 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 \
@@ -69,12 +55,22 @@ RUN set -ex \
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 \
+ 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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file 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 \
@@ -84,45 +80,53 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ 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 \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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' '{}' ';' \
+ 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 \
+ | xargs -rt apk add --no-network --virtual .python-rundeps \
+ ; \
+ apk del --no-network .build-deps; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
@@ -140,7 +144,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.11-rc-bullseye/Dockerfile b/python_3.11-rc-bullseye/Dockerfile
index 5ec4d34..d31738b 100644
--- a/python_3.11-rc-bullseye/Dockerfile
+++ b/python_3.11-rc-bullseye/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -13,32 +13,35 @@ ENV PATH /usr/local/bin:$PATH
# > 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 \
+# runtime dependencies
+RUN set -eux; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
libbluetooth-dev \
tk-dev \
uuid-dev \
- && rm -rf /var/lib/apt/lists/*
+ ; \
+ rm -rf /var/lib/apt/lists/*
ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D
ENV PYTHON_VERSION 3.11.0a4
-RUN set -ex \
+RUN set -eux; \
\
- && 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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -48,39 +51,47 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ nproc="$(nproc)"; \
+ make -j "$nproc" \
+ LDFLAGS="-Wl,--strip-all" \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
python get-pip.py \
--disable-pip-version-check \
@@ -95,7 +106,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.11-rc-bullseye/Dockerfile b/python_3.11-rc-buster/Dockerfile
similarity index 50%
copy from python_3.11-rc-bullseye/Dockerfile
copy to python_3.11-rc-buster/Dockerfile
index 5ec4d34..e29d39a 100644
--- a/python_3.11-rc-bullseye/Dockerfile
+++ b/python_3.11-rc-buster/Dockerfile
@@ -1,10 +1,10 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
-FROM buildpack-deps:bullseye
+FROM buildpack-deps:buster
# ensure local python is preferred over distribution python
ENV PATH /usr/local/bin:$PATH
@@ -13,32 +13,35 @@ ENV PATH /usr/local/bin:$PATH
# > 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 \
+# runtime dependencies
+RUN set -eux; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
libbluetooth-dev \
tk-dev \
uuid-dev \
- && rm -rf /var/lib/apt/lists/*
+ ; \
+ rm -rf /var/lib/apt/lists/*
ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D
ENV PYTHON_VERSION 3.11.0a4
-RUN set -ex \
+RUN set -eux; \
\
- && 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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -48,39 +51,47 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ nproc="$(nproc)"; \
+ make -j "$nproc" \
+ LDFLAGS="-Wl,--strip-all" \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
python get-pip.py \
--disable-pip-version-check \
@@ -95,7 +106,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.11-rc-slim/Dockerfile b/python_3.11-rc-slim-buster/Dockerfile
similarity index 56%
copy from python_3.11-rc-slim/Dockerfile
copy to python_3.11-rc-slim-buster/Dockerfile
index dc92a9a..6bd24db 100644
--- a/python_3.11-rc-slim/Dockerfile
+++ b/python_3.11-rc-slim-buster/Dockerfile
@@ -1,10 +1,10 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
-FROM debian:bullseye-slim
+FROM debian:buster-slim
# ensure local python is preferred over distribution python
ENV PATH /usr/local/bin:$PATH
@@ -26,12 +26,14 @@ RUN set -eux; \
ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D
ENV PYTHON_VERSION 3.11.0a4
-RUN set -ex \
+RUN set -eux; \
\
- && savedAptMark="$(apt-mark showmanual)" \
- && apt-get update && apt-get install -y --no-install-recommends \
+ savedAptMark="$(apt-mark showmanual)"; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
dpkg-dev \
gcc \
+ gnupg dirmngr \
libbluetooth-dev \
libbz2-dev \
libc6-dev \
@@ -49,23 +51,22 @@ RUN set -ex \
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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -75,59 +76,67 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ make -j "$nproc" \
LDFLAGS="-Wl,--strip-all" \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && apt-mark auto '.*' > /dev/null \
- && apt-mark manual $savedAptMark \
- && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
+ 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/* \
+ ; \
+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+ rm -rf /var/lib/apt/lists/*; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends wget; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
apt-mark auto '.*' > /dev/null; \
- [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*; \
\
@@ -144,7 +153,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.11-rc-slim/Dockerfile b/python_3.11-rc-slim/Dockerfile
index dc92a9a..46fe043 100644
--- a/python_3.11-rc-slim/Dockerfile
+++ b/python_3.11-rc-slim/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -26,12 +26,14 @@ RUN set -eux; \
ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D
ENV PYTHON_VERSION 3.11.0a4
-RUN set -ex \
+RUN set -eux; \
\
- && savedAptMark="$(apt-mark showmanual)" \
- && apt-get update && apt-get install -y --no-install-recommends \
+ savedAptMark="$(apt-mark showmanual)"; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
dpkg-dev \
gcc \
+ gnupg dirmngr \
libbluetooth-dev \
libbz2-dev \
libc6-dev \
@@ -49,23 +51,22 @@ RUN set -ex \
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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -75,59 +76,67 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ make -j "$nproc" \
LDFLAGS="-Wl,--strip-all" \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && apt-mark auto '.*' > /dev/null \
- && apt-mark manual $savedAptMark \
- && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
+ 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/* \
+ ; \
+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+ rm -rf /var/lib/apt/lists/*; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends wget; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
apt-mark auto '.*' > /dev/null; \
- [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*; \
\
@@ -144,7 +153,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.11-rc-windowsservercore-1809/Dockerfile b/python_3.11-rc-windowsservercore-1809/Dockerfile
index 602c2c8..41be28a 100644
--- a/python_3.11-rc-windowsservercore-1809/Dockerfile
+++ b/python_3.11-rc-windowsservercore-1809/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -12,9 +12,8 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
ENV PYTHONIOENCODING UTF-8
ENV PYTHON_VERSION 3.11.0a4
-ENV PYTHON_RELEASE 3.11.0
-RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \
+RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($env:PYTHON_VERSION -replace '[a-z]+[0-9]*$', ''), $env:PYTHON_VERSION); \
Write-Host ('Downloading {0} ...' -f $url); \
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \
@@ -54,7 +53,7 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
diff --git a/python_3.11-rc-windowsservercore-ltsc2022/Dockerfile b/python_3.11-rc-windowsservercore-ltsc2022/Dockerfile
index b0c7ffa..1a32ee3 100644
--- a/python_3.11-rc-windowsservercore-ltsc2022/Dockerfile
+++ b/python_3.11-rc-windowsservercore-ltsc2022/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -12,9 +12,8 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
ENV PYTHONIOENCODING UTF-8
ENV PYTHON_VERSION 3.11.0a4
-ENV PYTHON_RELEASE 3.11.0
-RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \
+RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($env:PYTHON_VERSION -replace '[a-z]+[0-9]*$', ''), $env:PYTHON_VERSION); \
Write-Host ('Downloading {0} ...' -f $url); \
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \
@@ -54,7 +53,7 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
diff --git a/python_3.7-alpine/Dockerfile b/python_3.7-alpine/Dockerfile
index 69f1010..c3ddbe6 100644
--- a/python_3.7-alpine/Dockerfile
+++ b/python_3.7-alpine/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -16,32 +16,20 @@ ENV LANG C.UTF-8
# runtime dependencies
RUN set -eux; \
apk add --no-cache \
-# install ca-certificates so that HTTPS works consistently
ca-certificates \
+ tzdata \
;
-# other runtime dependencies for Python are installed later
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
ENV PYTHON_VERSION 3.7.12
-RUN set -ex \
- && apk add --no-cache --virtual .fetch-deps \
+RUN set -eux; \
+ \
+ apk add --no-cache --virtual .build-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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && 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 \
@@ -67,12 +55,22 @@ RUN set -ex \
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 \
+ 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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file 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 \
@@ -81,7 +79,9 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ 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" \
@@ -122,31 +122,37 @@ RUN set -ex \
test_traceback \
test_unicode \
' \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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' '{}' ';' \
+ 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 \
+ | xargs -rt apk add --no-network --virtual .python-rundeps \
+ ; \
+ apk del --no-network .build-deps; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
@@ -156,7 +162,7 @@ ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
@@ -174,7 +180,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.7-alpine3.14/Dockerfile b/python_3.7-alpine3.14/Dockerfile
index 51cc3de..f8601d9 100644
--- a/python_3.7-alpine3.14/Dockerfile
+++ b/python_3.7-alpine3.14/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -16,32 +16,20 @@ ENV LANG C.UTF-8
# runtime dependencies
RUN set -eux; \
apk add --no-cache \
-# install ca-certificates so that HTTPS works consistently
ca-certificates \
+ tzdata \
;
-# other runtime dependencies for Python are installed later
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
ENV PYTHON_VERSION 3.7.12
-RUN set -ex \
- && apk add --no-cache --virtual .fetch-deps \
+RUN set -eux; \
+ \
+ apk add --no-cache --virtual .build-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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && 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 \
@@ -67,12 +55,22 @@ RUN set -ex \
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 \
+ 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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file 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 \
@@ -81,7 +79,9 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ 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" \
@@ -122,31 +122,37 @@ RUN set -ex \
test_traceback \
test_unicode \
' \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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' '{}' ';' \
+ 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 \
+ | xargs -rt apk add --no-network --virtual .python-rundeps \
+ ; \
+ apk del --no-network .build-deps; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
@@ -156,7 +162,7 @@ ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
@@ -174,7 +180,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.7-bullseye/Dockerfile b/python_3.7-bullseye/Dockerfile
index f3ee47d..7e28ea4 100644
--- a/python_3.7-bullseye/Dockerfile
+++ b/python_3.7-bullseye/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -13,32 +13,35 @@ ENV PATH /usr/local/bin:$PATH
# > 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 \
+# runtime dependencies
+RUN set -eux; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
libbluetooth-dev \
tk-dev \
uuid-dev \
- && rm -rf /var/lib/apt/lists/*
+ ; \
+ rm -rf /var/lib/apt/lists/*
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
ENV PYTHON_VERSION 3.7.12
-RUN set -ex \
+RUN set -eux; \
\
- && 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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -47,7 +50,10 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ 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 \
@@ -84,26 +90,31 @@ RUN set -ex \
test_traceback \
test_unicode \
' \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
@@ -113,10 +124,10 @@ ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
python get-pip.py \
--disable-pip-version-check \
@@ -131,7 +142,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.7-buster/Dockerfile b/python_3.7-buster/Dockerfile
index b5c08cb..a599093 100644
--- a/python_3.7-buster/Dockerfile
+++ b/python_3.7-buster/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -13,32 +13,35 @@ ENV PATH /usr/local/bin:$PATH
# > 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 \
+# runtime dependencies
+RUN set -eux; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
libbluetooth-dev \
tk-dev \
uuid-dev \
- && rm -rf /var/lib/apt/lists/*
+ ; \
+ rm -rf /var/lib/apt/lists/*
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
ENV PYTHON_VERSION 3.7.12
-RUN set -ex \
+RUN set -eux; \
\
- && 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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -47,7 +50,10 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ 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 \
@@ -84,26 +90,31 @@ RUN set -ex \
test_traceback \
test_unicode \
' \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
@@ -113,10 +124,10 @@ ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
python get-pip.py \
--disable-pip-version-check \
@@ -131,7 +142,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.7-slim-buster/Dockerfile b/python_3.7-slim-buster/Dockerfile
index 85c4e4c..d1f2ae1 100644
--- a/python_3.7-slim-buster/Dockerfile
+++ b/python_3.7-slim-buster/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -19,18 +19,21 @@ RUN set -eux; \
apt-get install -y --no-install-recommends \
ca-certificates \
netbase \
+ tzdata \
; \
rm -rf /var/lib/apt/lists/*
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
ENV PYTHON_VERSION 3.7.12
-RUN set -ex \
+RUN set -eux; \
\
- && savedAptMark="$(apt-mark showmanual)" \
- && apt-get update && apt-get install -y --no-install-recommends \
+ savedAptMark="$(apt-mark showmanual)"; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
dpkg-dev \
gcc \
+ gnupg dirmngr \
libbluetooth-dev \
libbz2-dev \
libc6-dev \
@@ -48,23 +51,22 @@ RUN set -ex \
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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -73,7 +75,9 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ 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 \
@@ -111,38 +115,44 @@ RUN set -ex \
test_traceback \
test_unicode \
' \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && apt-mark auto '.*' > /dev/null \
- && apt-mark manual $savedAptMark \
- && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
+ 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/* \
+ ; \
+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+ rm -rf /var/lib/apt/lists/*; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
@@ -152,17 +162,17 @@ ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends wget; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
apt-mark auto '.*' > /dev/null; \
- [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*; \
\
@@ -179,7 +189,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.7-slim/Dockerfile b/python_3.7-slim/Dockerfile
index 2780275..a748812 100644
--- a/python_3.7-slim/Dockerfile
+++ b/python_3.7-slim/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -19,18 +19,21 @@ RUN set -eux; \
apt-get install -y --no-install-recommends \
ca-certificates \
netbase \
+ tzdata \
; \
rm -rf /var/lib/apt/lists/*
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
ENV PYTHON_VERSION 3.7.12
-RUN set -ex \
+RUN set -eux; \
\
- && savedAptMark="$(apt-mark showmanual)" \
- && apt-get update && apt-get install -y --no-install-recommends \
+ savedAptMark="$(apt-mark showmanual)"; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
dpkg-dev \
gcc \
+ gnupg dirmngr \
libbluetooth-dev \
libbz2-dev \
libc6-dev \
@@ -48,23 +51,22 @@ RUN set -ex \
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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -73,7 +75,9 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ 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 \
@@ -111,38 +115,44 @@ RUN set -ex \
test_traceback \
test_unicode \
' \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && apt-mark auto '.*' > /dev/null \
- && apt-mark manual $savedAptMark \
- && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
+ 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/* \
+ ; \
+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+ rm -rf /var/lib/apt/lists/*; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
@@ -152,17 +162,17 @@ ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends wget; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
apt-mark auto '.*' > /dev/null; \
- [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*; \
\
@@ -179,7 +189,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.8-alpine/Dockerfile b/python_3.8-alpine/Dockerfile
index 33fa0d0..78063a8 100644
--- a/python_3.8-alpine/Dockerfile
+++ b/python_3.8-alpine/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -16,32 +16,20 @@ ENV LANG C.UTF-8
# runtime dependencies
RUN set -eux; \
apk add --no-cache \
-# install ca-certificates so that HTTPS works consistently
ca-certificates \
+ tzdata \
;
-# other runtime dependencies for Python are installed later
ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568
ENV PYTHON_VERSION 3.8.12
-RUN set -ex \
- && apk add --no-cache --virtual .fetch-deps \
+RUN set -eux; \
+ \
+ apk add --no-cache --virtual .build-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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && 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 \
@@ -67,12 +55,22 @@ RUN set -ex \
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 \
+ 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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file 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 \
@@ -81,36 +79,44 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ 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 \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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' '{}' ';' \
+ 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 \
+ | xargs -rt apk add --no-network --virtual .python-rundeps \
+ ; \
+ apk del --no-network .build-deps; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
@@ -120,7 +126,7 @@ ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
@@ -138,7 +144,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.8-alpine3.14/Dockerfile b/python_3.8-alpine3.14/Dockerfile
index 835f048..5175b72 100644
--- a/python_3.8-alpine3.14/Dockerfile
+++ b/python_3.8-alpine3.14/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -16,32 +16,20 @@ ENV LANG C.UTF-8
# runtime dependencies
RUN set -eux; \
apk add --no-cache \
-# install ca-certificates so that HTTPS works consistently
ca-certificates \
+ tzdata \
;
-# other runtime dependencies for Python are installed later
ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568
ENV PYTHON_VERSION 3.8.12
-RUN set -ex \
- && apk add --no-cache --virtual .fetch-deps \
+RUN set -eux; \
+ \
+ apk add --no-cache --virtual .build-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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && 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 \
@@ -67,12 +55,22 @@ RUN set -ex \
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 \
+ 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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file 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 \
@@ -81,36 +79,44 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ 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 \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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' '{}' ';' \
+ 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 \
+ | xargs -rt apk add --no-network --virtual .python-rundeps \
+ ; \
+ apk del --no-network .build-deps; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
@@ -120,7 +126,7 @@ ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
@@ -138,7 +144,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.8-bullseye/Dockerfile b/python_3.8-bullseye/Dockerfile
index 3d29f27..fea5aba 100644
--- a/python_3.8-bullseye/Dockerfile
+++ b/python_3.8-bullseye/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -13,32 +13,35 @@ ENV PATH /usr/local/bin:$PATH
# > 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 \
+# runtime dependencies
+RUN set -eux; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
libbluetooth-dev \
tk-dev \
uuid-dev \
- && rm -rf /var/lib/apt/lists/*
+ ; \
+ rm -rf /var/lib/apt/lists/*
ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568
ENV PYTHON_VERSION 3.8.12
-RUN set -ex \
+RUN set -eux; \
\
- && 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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -47,27 +50,35 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ nproc="$(nproc)"; \
+ make -j "$nproc" \
+ LDFLAGS="-Wl,--strip-all" \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
@@ -77,10 +88,10 @@ ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
python get-pip.py \
--disable-pip-version-check \
@@ -95,7 +106,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.8-buster/Dockerfile b/python_3.8-buster/Dockerfile
index 4c8317a..3a821eb 100644
--- a/python_3.8-buster/Dockerfile
+++ b/python_3.8-buster/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -13,32 +13,35 @@ ENV PATH /usr/local/bin:$PATH
# > 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 \
+# runtime dependencies
+RUN set -eux; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
libbluetooth-dev \
tk-dev \
uuid-dev \
- && rm -rf /var/lib/apt/lists/*
+ ; \
+ rm -rf /var/lib/apt/lists/*
ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568
ENV PYTHON_VERSION 3.8.12
-RUN set -ex \
+RUN set -eux; \
\
- && 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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -47,27 +50,35 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ nproc="$(nproc)"; \
+ make -j "$nproc" \
+ LDFLAGS="-Wl,--strip-all" \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
@@ -77,10 +88,10 @@ ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
python get-pip.py \
--disable-pip-version-check \
@@ -95,7 +106,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.8-slim-buster/Dockerfile b/python_3.8-slim-buster/Dockerfile
index 66b4202..86e7e1e 100644
--- a/python_3.8-slim-buster/Dockerfile
+++ b/python_3.8-slim-buster/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -19,18 +19,21 @@ RUN set -eux; \
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.8.12
-RUN set -ex \
+RUN set -eux; \
\
- && savedAptMark="$(apt-mark showmanual)" \
- && apt-get update && apt-get install -y --no-install-recommends \
+ savedAptMark="$(apt-mark showmanual)"; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
dpkg-dev \
gcc \
+ gnupg dirmngr \
libbluetooth-dev \
libbz2-dev \
libc6-dev \
@@ -48,23 +51,22 @@ RUN set -ex \
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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -73,40 +75,48 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ make -j "$nproc" \
LDFLAGS="-Wl,--strip-all" \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && apt-mark auto '.*' > /dev/null \
- && apt-mark manual $savedAptMark \
- && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
+ 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/* \
+ ; \
+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+ rm -rf /var/lib/apt/lists/*; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
@@ -116,17 +126,17 @@ ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends wget; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
apt-mark auto '.*' > /dev/null; \
- [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*; \
\
@@ -143,7 +153,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.8-slim/Dockerfile b/python_3.8-slim/Dockerfile
index d5f3d07..c49399b 100644
--- a/python_3.8-slim/Dockerfile
+++ b/python_3.8-slim/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -19,18 +19,21 @@ RUN set -eux; \
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.8.12
-RUN set -ex \
+RUN set -eux; \
\
- && savedAptMark="$(apt-mark showmanual)" \
- && apt-get update && apt-get install -y --no-install-recommends \
+ savedAptMark="$(apt-mark showmanual)"; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
dpkg-dev \
gcc \
+ gnupg dirmngr \
libbluetooth-dev \
libbz2-dev \
libc6-dev \
@@ -48,23 +51,22 @@ RUN set -ex \
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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -73,40 +75,48 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ make -j "$nproc" \
LDFLAGS="-Wl,--strip-all" \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && apt-mark auto '.*' > /dev/null \
- && apt-mark manual $savedAptMark \
- && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
+ 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/* \
+ ; \
+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+ rm -rf /var/lib/apt/lists/*; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
@@ -116,17 +126,17 @@ ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends wget; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
apt-mark auto '.*' > /dev/null; \
- [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*; \
\
@@ -143,7 +153,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.9-alpine/Dockerfile b/python_3.9-alpine/Dockerfile
index bd78d43..3e04630 100644
--- a/python_3.9-alpine/Dockerfile
+++ b/python_3.9-alpine/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -16,34 +16,20 @@ 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.10
-RUN set -ex \
- && apk add --no-cache --virtual .fetch-deps \
+RUN set -eux; \
+ \
+ apk add --no-cache --virtual .build-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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && 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 \
@@ -69,12 +55,22 @@ RUN set -ex \
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 \
+ 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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file 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 \
@@ -83,45 +79,53 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ 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 \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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' '{}' ';' \
+ 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 \
+ | xargs -rt apk add --no-network --virtual .python-rundeps \
+ ; \
+ apk del --no-network .build-deps; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
@@ -139,7 +143,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.9-alpine3.14/Dockerfile b/python_3.9-alpine3.14/Dockerfile
index 1edcf98..cadc172 100644
--- a/python_3.9-alpine3.14/Dockerfile
+++ b/python_3.9-alpine3.14/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -16,34 +16,20 @@ 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.10
-RUN set -ex \
- && apk add --no-cache --virtual .fetch-deps \
+RUN set -eux; \
+ \
+ apk add --no-cache --virtual .build-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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && 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 \
@@ -69,12 +55,22 @@ RUN set -ex \
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 \
+ 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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file 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 \
@@ -83,45 +79,53 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ 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 \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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' '{}' ';' \
+ 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 \
+ | xargs -rt apk add --no-network --virtual .python-rundeps \
+ ; \
+ apk del --no-network .build-deps; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
@@ -139,7 +143,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.9-bullseye/Dockerfile b/python_3.9-bullseye/Dockerfile
index 6c6ce18..3eee41b 100644
--- a/python_3.9-bullseye/Dockerfile
+++ b/python_3.9-bullseye/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -13,32 +13,35 @@ ENV PATH /usr/local/bin:$PATH
# > 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 \
+# runtime dependencies
+RUN set -eux; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
libbluetooth-dev \
tk-dev \
uuid-dev \
- && rm -rf /var/lib/apt/lists/*
+ ; \
+ rm -rf /var/lib/apt/lists/*
ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568
ENV PYTHON_VERSION 3.9.10
-RUN set -ex \
+RUN set -eux; \
\
- && 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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -47,39 +50,47 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ nproc="$(nproc)"; \
+ make -j "$nproc" \
+ LDFLAGS="-Wl,--strip-all" \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
python get-pip.py \
--disable-pip-version-check \
@@ -94,7 +105,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.9-buster/Dockerfile b/python_3.9-buster/Dockerfile
index 7537657..bc2c5b3 100644
--- a/python_3.9-buster/Dockerfile
+++ b/python_3.9-buster/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -13,32 +13,35 @@ ENV PATH /usr/local/bin:$PATH
# > 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 \
+# runtime dependencies
+RUN set -eux; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
libbluetooth-dev \
tk-dev \
uuid-dev \
- && rm -rf /var/lib/apt/lists/*
+ ; \
+ rm -rf /var/lib/apt/lists/*
ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568
ENV PYTHON_VERSION 3.9.10
-RUN set -ex \
+RUN set -eux; \
\
- && 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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -47,39 +50,47 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ nproc="$(nproc)"; \
+ make -j "$nproc" \
+ LDFLAGS="-Wl,--strip-all" \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
python get-pip.py \
--disable-pip-version-check \
@@ -94,7 +105,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.9-slim-buster/Dockerfile b/python_3.9-slim-buster/Dockerfile
index f0c4f09..5f216b9 100644
--- a/python_3.9-slim-buster/Dockerfile
+++ b/python_3.9-slim-buster/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -26,12 +26,14 @@ RUN set -eux; \
ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568
ENV PYTHON_VERSION 3.9.10
-RUN set -ex \
+RUN set -eux; \
\
- && savedAptMark="$(apt-mark showmanual)" \
- && apt-get update && apt-get install -y --no-install-recommends \
+ savedAptMark="$(apt-mark showmanual)"; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
dpkg-dev \
gcc \
+ gnupg dirmngr \
libbluetooth-dev \
libbz2-dev \
libc6-dev \
@@ -49,23 +51,22 @@ RUN set -ex \
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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -74,59 +75,67 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ make -j "$nproc" \
LDFLAGS="-Wl,--strip-all" \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && apt-mark auto '.*' > /dev/null \
- && apt-mark manual $savedAptMark \
- && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
+ 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/* \
+ ; \
+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+ rm -rf /var/lib/apt/lists/*; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends wget; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
apt-mark auto '.*' > /dev/null; \
- [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*; \
\
@@ -143,7 +152,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.9-slim/Dockerfile b/python_3.9-slim/Dockerfile
index 1ec0271..d6e929e 100644
--- a/python_3.9-slim/Dockerfile
+++ b/python_3.9-slim/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -26,12 +26,14 @@ RUN set -eux; \
ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568
ENV PYTHON_VERSION 3.9.10
-RUN set -ex \
+RUN set -eux; \
\
- && savedAptMark="$(apt-mark showmanual)" \
- && apt-get update && apt-get install -y --no-install-recommends \
+ savedAptMark="$(apt-mark showmanual)"; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
dpkg-dev \
gcc \
+ gnupg dirmngr \
libbluetooth-dev \
libbz2-dev \
libc6-dev \
@@ -49,23 +51,22 @@ RUN set -ex \
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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -74,59 +75,67 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ make -j "$nproc" \
LDFLAGS="-Wl,--strip-all" \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && apt-mark auto '.*' > /dev/null \
- && apt-mark manual $savedAptMark \
- && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
+ 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/* \
+ ; \
+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+ rm -rf /var/lib/apt/lists/*; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends wget; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
apt-mark auto '.*' > /dev/null; \
- [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*; \
\
@@ -143,7 +152,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_3.9-windowsservercore-1809/Dockerfile b/python_3.9-windowsservercore-1809/Dockerfile
index 628f3e9..91c0747 100644
--- a/python_3.9-windowsservercore-1809/Dockerfile
+++ b/python_3.9-windowsservercore-1809/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -12,9 +12,8 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
ENV PYTHONIOENCODING UTF-8
ENV PYTHON_VERSION 3.9.10
-ENV PYTHON_RELEASE 3.9.10
-RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \
+RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($env:PYTHON_VERSION -replace '[a-z]+[0-9]*$', ''), $env:PYTHON_VERSION); \
Write-Host ('Downloading {0} ...' -f $url); \
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \
@@ -54,7 +53,7 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
diff --git a/python_3.9-windowsservercore-ltsc2022/Dockerfile b/python_3.9-windowsservercore-ltsc2022/Dockerfile
index 91cb3e7..d3a719f 100644
--- a/python_3.9-windowsservercore-ltsc2022/Dockerfile
+++ b/python_3.9-windowsservercore-ltsc2022/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -12,9 +12,8 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
ENV PYTHONIOENCODING UTF-8
ENV PYTHON_VERSION 3.9.10
-ENV PYTHON_RELEASE 3.9.10
-RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \
+RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($env:PYTHON_VERSION -replace '[a-z]+[0-9]*$', ''), $env:PYTHON_VERSION); \
Write-Host ('Downloading {0} ...' -f $url); \
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \
@@ -54,7 +53,7 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
diff --git a/python_alpine/Dockerfile b/python_alpine/Dockerfile
index ffcb48d..ec9a3d9 100644
--- a/python_alpine/Dockerfile
+++ b/python_alpine/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -16,34 +16,20 @@ 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.2
-RUN set -ex \
- && apk add --no-cache --virtual .fetch-deps \
+RUN set -eux; \
+ \
+ apk add --no-cache --virtual .build-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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && 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 \
@@ -69,12 +55,22 @@ RUN set -ex \
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 \
+ 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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file 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 \
@@ -84,45 +80,53 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ 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 \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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' '{}' ';' \
+ 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 \
+ | xargs -rt apk add --no-network --virtual .python-rundeps \
+ ; \
+ apk del --no-network .build-deps; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
@@ -140,7 +144,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_alpine3.14/Dockerfile b/python_alpine3.14/Dockerfile
index 9c594b5..75b6e20 100644
--- a/python_alpine3.14/Dockerfile
+++ b/python_alpine3.14/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -16,34 +16,20 @@ 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.2
-RUN set -ex \
- && apk add --no-cache --virtual .fetch-deps \
+RUN set -eux; \
+ \
+ apk add --no-cache --virtual .build-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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && 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 \
@@ -69,12 +55,22 @@ RUN set -ex \
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 \
+ 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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file 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 \
@@ -84,45 +80,53 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ 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 \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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' '{}' ';' \
+ 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 \
+ | xargs -rt apk add --no-network --virtual .python-rundeps \
+ ; \
+ apk del --no-network .build-deps; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
@@ -140,7 +144,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_bullseye/Dockerfile b/python_bullseye/Dockerfile
index 15f79fd..49daa05 100644
--- a/python_bullseye/Dockerfile
+++ b/python_bullseye/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -13,32 +13,35 @@ ENV PATH /usr/local/bin:$PATH
# > 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 \
+# runtime dependencies
+RUN set -eux; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
libbluetooth-dev \
tk-dev \
uuid-dev \
- && rm -rf /var/lib/apt/lists/*
+ ; \
+ rm -rf /var/lib/apt/lists/*
ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D
ENV PYTHON_VERSION 3.10.2
-RUN set -ex \
+RUN set -eux; \
\
- && 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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -48,39 +51,47 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ nproc="$(nproc)"; \
+ make -j "$nproc" \
+ LDFLAGS="-Wl,--strip-all" \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
python get-pip.py \
--disable-pip-version-check \
@@ -95,7 +106,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_buster/Dockerfile b/python_buster/Dockerfile
index 2f495fd..52e8d34 100644
--- a/python_buster/Dockerfile
+++ b/python_buster/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -13,32 +13,35 @@ ENV PATH /usr/local/bin:$PATH
# > 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 \
+# runtime dependencies
+RUN set -eux; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
libbluetooth-dev \
tk-dev \
uuid-dev \
- && rm -rf /var/lib/apt/lists/*
+ ; \
+ rm -rf /var/lib/apt/lists/*
ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D
ENV PYTHON_VERSION 3.10.2
-RUN set -ex \
+RUN set -eux; \
\
- && 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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -48,39 +51,47 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ nproc="$(nproc)"; \
+ make -j "$nproc" \
+ LDFLAGS="-Wl,--strip-all" \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
python get-pip.py \
--disable-pip-version-check \
@@ -95,7 +106,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_slim-buster/Dockerfile b/python_slim-buster/Dockerfile
index b62bcc7..668719b 100644
--- a/python_slim-buster/Dockerfile
+++ b/python_slim-buster/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -26,12 +26,14 @@ RUN set -eux; \
ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D
ENV PYTHON_VERSION 3.10.2
-RUN set -ex \
+RUN set -eux; \
\
- && savedAptMark="$(apt-mark showmanual)" \
- && apt-get update && apt-get install -y --no-install-recommends \
+ savedAptMark="$(apt-mark showmanual)"; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
dpkg-dev \
gcc \
+ gnupg dirmngr \
libbluetooth-dev \
libbz2-dev \
libc6-dev \
@@ -49,23 +51,22 @@ RUN set -ex \
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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -75,59 +76,67 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ make -j "$nproc" \
LDFLAGS="-Wl,--strip-all" \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && apt-mark auto '.*' > /dev/null \
- && apt-mark manual $savedAptMark \
- && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
+ 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/* \
+ ; \
+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+ rm -rf /var/lib/apt/lists/*; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends wget; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
apt-mark auto '.*' > /dev/null; \
- [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*; \
\
@@ -144,7 +153,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_slim/Dockerfile b/python_slim/Dockerfile
index 4798d39..a7e1656 100644
--- a/python_slim/Dockerfile
+++ b/python_slim/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -26,12 +26,14 @@ RUN set -eux; \
ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D
ENV PYTHON_VERSION 3.10.2
-RUN set -ex \
+RUN set -eux; \
\
- && savedAptMark="$(apt-mark showmanual)" \
- && apt-get update && apt-get install -y --no-install-recommends \
+ savedAptMark="$(apt-mark showmanual)"; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
dpkg-dev \
gcc \
+ gnupg dirmngr \
libbluetooth-dev \
libbz2-dev \
libc6-dev \
@@ -49,23 +51,22 @@ RUN set -ex \
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 hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
- && gpg --batch --verify python.tar.xz.asc python.tar.xz \
- && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
- && rm -rf "$GNUPGHOME" python.tar.xz.asc \
- && mkdir -p /usr/src/python \
- && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
- && rm python.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"; \
+ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \
+ gpg --batch --verify python.tar.xz.asc python.tar.xz; \
+ command -v gpgconf > /dev/null && gpgconf --kill all || :; \
+ rm -rf "$GNUPGHOME" python.tar.xz.asc; \
+ mkdir -p /usr/src/python; \
+ tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \
+ rm python.tar.xz; \
\
- && cd /usr/src/python \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
- && ./configure \
+ cd /usr/src/python; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -75,59 +76,67 @@ RUN set -ex \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
- && make -j "$(nproc)" \
+ ; \
+ nproc="$(nproc)"; \
+ make -j "$nproc" \
LDFLAGS="-Wl,--strip-all" \
- && make install \
- && rm -rf /usr/src/python \
+ ; \
+ make install; \
+ cd /; \
+ rm -rf /usr/src/python; \
\
- && find /usr/local -depth \
+ 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 \
+ ldconfig; \
\
- && apt-mark auto '.*' > /dev/null \
- && apt-mark manual $savedAptMark \
- && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
+ 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/* \
+ ; \
+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+ rm -rf /var/lib/apt/lists/*; \
\
- && python3 --version
+ 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
+# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
+RUN set -eux; \
+ for src in idle3 pydoc3 python3 python3-config; do \
+ dst="$(echo "$src" | tr -d 3)"; \
+ [ -s "/usr/local/bin/$src" ]; \
+ [ ! -e "/usr/local/bin/$dst" ]; \
+ ln -svT "/usr/local/bin/$src" "/usr/local/bin/$dst"; \
+ done
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
-RUN set -ex; \
+RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends wget; \
\
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
- echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
+ echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
apt-mark auto '.*' > /dev/null; \
- [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*; \
\
@@ -144,7 +153,8 @@ RUN set -ex; \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
- \) -exec rm -rf '{}' +; \
+ \) -exec rm -rf '{}' + \
+ ; \
rm -f get-pip.py
CMD ["python3"]
diff --git a/python_windowsservercore-1809/Dockerfile b/python_windowsservercore-1809/Dockerfile
index 2e814ae..b1013ec 100644
--- a/python_windowsservercore-1809/Dockerfile
+++ b/python_windowsservercore-1809/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -12,9 +12,8 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
ENV PYTHONIOENCODING UTF-8
ENV PYTHON_VERSION 3.10.2
-ENV PYTHON_RELEASE 3.10.2
-RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \
+RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($env:PYTHON_VERSION -replace '[a-z]+[0-9]*$', ''), $env:PYTHON_VERSION); \
Write-Host ('Downloading {0} ...' -f $url); \
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \
@@ -54,7 +53,7 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309
diff --git a/python_windowsservercore-ltsc2022/Dockerfile b/python_windowsservercore-ltsc2022/Dockerfile
index e9afdeb..0c62bf4 100644
--- a/python_windowsservercore-ltsc2022/Dockerfile
+++ b/python_windowsservercore-ltsc2022/Dockerfile
@@ -1,5 +1,5 @@
#
-# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@@ -12,9 +12,8 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
ENV PYTHONIOENCODING UTF-8
ENV PYTHON_VERSION 3.10.2
-ENV PYTHON_RELEASE 3.10.2
-RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \
+RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($env:PYTHON_VERSION -replace '[a-z]+[0-9]*$', ''), $env:PYTHON_VERSION); \
Write-Host ('Downloading {0} ...' -f $url); \
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \
@@ -54,7 +53,7 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
# https://github.com/docker-library/python/issues/365
-ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
+ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309 Relevant Maintainers: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes: