Skip to content

Commit 465cbc7

Browse files
authored
Merge pull request docker-library#659 from mangin/3.11-rc
Added 3.11-rc
2 parents f9647a5 + 34e07d8 commit 465cbc7

File tree

7 files changed

+572
-3
lines changed

7 files changed

+572
-3
lines changed

3.11-rc/alpine3.14/Dockerfile

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
7+
FROM alpine:3.14
8+
9+
# ensure local python is preferred over distribution python
10+
ENV PATH /usr/local/bin:$PATH
11+
12+
# http://bugs.python.org/issue19846
13+
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
14+
ENV LANG C.UTF-8
15+
16+
# runtime dependencies
17+
RUN set -eux; \
18+
apk add --no-cache \
19+
# install ca-certificates so that HTTPS works consistently
20+
ca-certificates \
21+
# and tzdata for PEP 615 (https://www.python.org/dev/peps/pep-0615/)
22+
tzdata \
23+
;
24+
# other runtime dependencies for Python are installed later
25+
26+
ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D
27+
ENV PYTHON_VERSION 3.11.0a1
28+
29+
RUN set -ex \
30+
&& apk add --no-cache --virtual .fetch-deps \
31+
gnupg \
32+
tar \
33+
xz \
34+
\
35+
&& wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
36+
&& wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
37+
&& export GNUPGHOME="$(mktemp -d)" \
38+
&& gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
39+
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
40+
&& { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
41+
&& rm -rf "$GNUPGHOME" python.tar.xz.asc \
42+
&& mkdir -p /usr/src/python \
43+
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
44+
&& rm python.tar.xz \
45+
\
46+
&& apk add --no-cache --virtual .build-deps \
47+
bluez-dev \
48+
bzip2-dev \
49+
coreutils \
50+
dpkg-dev dpkg \
51+
expat-dev \
52+
findutils \
53+
gcc \
54+
gdbm-dev \
55+
libc-dev \
56+
libffi-dev \
57+
libnsl-dev \
58+
libtirpc-dev \
59+
linux-headers \
60+
make \
61+
ncurses-dev \
62+
openssl-dev \
63+
pax-utils \
64+
readline-dev \
65+
sqlite-dev \
66+
tcl-dev \
67+
tk \
68+
tk-dev \
69+
util-linux-dev \
70+
xz-dev \
71+
zlib-dev \
72+
# add build deps before removing fetch deps in case there's overlap
73+
&& apk del --no-network .fetch-deps \
74+
\
75+
&& cd /usr/src/python \
76+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
77+
&& ./configure \
78+
--build="$gnuArch" \
79+
--enable-loadable-sqlite-extensions \
80+
--enable-optimizations \
81+
--enable-option-checking=fatal \
82+
--enable-shared \
83+
--with-system-expat \
84+
--with-system-ffi \
85+
--without-ensurepip \
86+
&& make -j "$(nproc)" \
87+
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
88+
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
89+
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
90+
LDFLAGS="-Wl,--strip-all" \
91+
&& make install \
92+
&& rm -rf /usr/src/python \
93+
\
94+
&& find /usr/local -depth \
95+
\( \
96+
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
97+
-o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \
98+
\) -exec rm -rf '{}' + \
99+
\
100+
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
101+
| tr ',' '\n' \
102+
| sort -u \
103+
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
104+
| xargs -rt apk add --no-cache --virtual .python-rundeps \
105+
&& apk del --no-network .build-deps \
106+
\
107+
&& python3 --version
108+
109+
# make some useful symlinks that are expected to exist
110+
RUN cd /usr/local/bin \
111+
&& ln -s idle3 idle \
112+
&& ln -s pydoc3 pydoc \
113+
&& ln -s python3 python \
114+
&& ln -s python3-config python-config
115+
116+
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
117+
ENV PYTHON_PIP_VERSION 21.2.4
118+
# https://github.com/docker-library/python/issues/365
119+
ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
120+
# https://github.com/pypa/get-pip
121+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/d781367b97acf0ece7e9e304bf281e99b618bf10/public/get-pip.py
122+
ENV PYTHON_GET_PIP_SHA256 01249aa3e58ffb3e1686b7141b4e9aac4d398ef4ac3012ed9dff8dd9f685ffe0
123+
124+
RUN set -ex; \
125+
\
126+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
127+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
128+
\
129+
python get-pip.py \
130+
--disable-pip-version-check \
131+
--no-cache-dir \
132+
"pip==$PYTHON_PIP_VERSION" \
133+
"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
134+
; \
135+
pip --version; \
136+
\
137+
find /usr/local -depth \
138+
\( \
139+
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
140+
-o \
141+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
142+
\) -exec rm -rf '{}' +; \
143+
rm -f get-pip.py
144+
145+
CMD ["python3"]

3.11-rc/bullseye/Dockerfile

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
7+
FROM buildpack-deps:bullseye
8+
9+
# ensure local python is preferred over distribution python
10+
ENV PATH /usr/local/bin:$PATH
11+
12+
# http://bugs.python.org/issue19846
13+
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
14+
ENV LANG C.UTF-8
15+
16+
# extra dependencies (over what buildpack-deps already includes)
17+
RUN apt-get update && apt-get install -y --no-install-recommends \
18+
libbluetooth-dev \
19+
tk-dev \
20+
uuid-dev \
21+
&& rm -rf /var/lib/apt/lists/*
22+
23+
ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D
24+
ENV PYTHON_VERSION 3.11.0a1
25+
26+
RUN set -ex \
27+
\
28+
&& wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
29+
&& wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
30+
&& export GNUPGHOME="$(mktemp -d)" \
31+
&& gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
32+
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
33+
&& { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
34+
&& rm -rf "$GNUPGHOME" python.tar.xz.asc \
35+
&& mkdir -p /usr/src/python \
36+
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
37+
&& rm python.tar.xz \
38+
\
39+
&& cd /usr/src/python \
40+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
41+
&& ./configure \
42+
--build="$gnuArch" \
43+
--enable-loadable-sqlite-extensions \
44+
--enable-optimizations \
45+
--enable-option-checking=fatal \
46+
--enable-shared \
47+
--with-system-expat \
48+
--with-system-ffi \
49+
--without-ensurepip \
50+
&& make -j "$(nproc)" \
51+
&& make install \
52+
&& rm -rf /usr/src/python \
53+
\
54+
&& find /usr/local -depth \
55+
\( \
56+
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
57+
-o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \
58+
\) -exec rm -rf '{}' + \
59+
\
60+
&& ldconfig \
61+
\
62+
&& python3 --version
63+
64+
# make some useful symlinks that are expected to exist
65+
RUN cd /usr/local/bin \
66+
&& ln -s idle3 idle \
67+
&& ln -s pydoc3 pydoc \
68+
&& ln -s python3 python \
69+
&& ln -s python3-config python-config
70+
71+
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
72+
ENV PYTHON_PIP_VERSION 21.2.4
73+
# https://github.com/docker-library/python/issues/365
74+
ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
75+
# https://github.com/pypa/get-pip
76+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/d781367b97acf0ece7e9e304bf281e99b618bf10/public/get-pip.py
77+
ENV PYTHON_GET_PIP_SHA256 01249aa3e58ffb3e1686b7141b4e9aac4d398ef4ac3012ed9dff8dd9f685ffe0
78+
79+
RUN set -ex; \
80+
\
81+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
82+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
83+
\
84+
python get-pip.py \
85+
--disable-pip-version-check \
86+
--no-cache-dir \
87+
"pip==$PYTHON_PIP_VERSION" \
88+
"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
89+
; \
90+
pip --version; \
91+
\
92+
find /usr/local -depth \
93+
\( \
94+
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
95+
-o \
96+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
97+
\) -exec rm -rf '{}' +; \
98+
rm -f get-pip.py
99+
100+
CMD ["python3"]

3.11-rc/bullseye/slim/Dockerfile

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
7+
FROM debian:bullseye-slim
8+
9+
# ensure local python is preferred over distribution python
10+
ENV PATH /usr/local/bin:$PATH
11+
12+
# http://bugs.python.org/issue19846
13+
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
14+
ENV LANG C.UTF-8
15+
16+
# runtime dependencies
17+
RUN set -eux; \
18+
apt-get update; \
19+
apt-get install -y --no-install-recommends \
20+
ca-certificates \
21+
netbase \
22+
tzdata \
23+
; \
24+
rm -rf /var/lib/apt/lists/*
25+
26+
ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D
27+
ENV PYTHON_VERSION 3.11.0a1
28+
29+
RUN set -ex \
30+
\
31+
&& savedAptMark="$(apt-mark showmanual)" \
32+
&& apt-get update && apt-get install -y --no-install-recommends \
33+
dpkg-dev \
34+
gcc \
35+
libbluetooth-dev \
36+
libbz2-dev \
37+
libc6-dev \
38+
libexpat1-dev \
39+
libffi-dev \
40+
libgdbm-dev \
41+
liblzma-dev \
42+
libncursesw5-dev \
43+
libreadline-dev \
44+
libsqlite3-dev \
45+
libssl-dev \
46+
make \
47+
tk-dev \
48+
uuid-dev \
49+
wget \
50+
xz-utils \
51+
zlib1g-dev \
52+
# as of Stretch, "gpg" is no longer included by default
53+
$(command -v gpg > /dev/null || echo 'gnupg dirmngr') \
54+
\
55+
&& wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
56+
&& wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
57+
&& export GNUPGHOME="$(mktemp -d)" \
58+
&& gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \
59+
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
60+
&& { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
61+
&& rm -rf "$GNUPGHOME" python.tar.xz.asc \
62+
&& mkdir -p /usr/src/python \
63+
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
64+
&& rm python.tar.xz \
65+
\
66+
&& cd /usr/src/python \
67+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
68+
&& ./configure \
69+
--build="$gnuArch" \
70+
--enable-loadable-sqlite-extensions \
71+
--enable-optimizations \
72+
--enable-option-checking=fatal \
73+
--enable-shared \
74+
--with-system-expat \
75+
--with-system-ffi \
76+
--without-ensurepip \
77+
&& make -j "$(nproc)" \
78+
LDFLAGS="-Wl,--strip-all" \
79+
&& make install \
80+
&& rm -rf /usr/src/python \
81+
\
82+
&& find /usr/local -depth \
83+
\( \
84+
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
85+
-o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \
86+
\) -exec rm -rf '{}' + \
87+
\
88+
&& ldconfig \
89+
\
90+
&& apt-mark auto '.*' > /dev/null \
91+
&& apt-mark manual $savedAptMark \
92+
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
93+
| awk '/=>/ { print $(NF-1) }' \
94+
| sort -u \
95+
| xargs -r dpkg-query --search \
96+
| cut -d: -f1 \
97+
| sort -u \
98+
| xargs -r apt-mark manual \
99+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
100+
&& rm -rf /var/lib/apt/lists/* \
101+
\
102+
&& python3 --version
103+
104+
# make some useful symlinks that are expected to exist
105+
RUN cd /usr/local/bin \
106+
&& ln -s idle3 idle \
107+
&& ln -s pydoc3 pydoc \
108+
&& ln -s python3 python \
109+
&& ln -s python3-config python-config
110+
111+
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
112+
ENV PYTHON_PIP_VERSION 21.2.4
113+
# https://github.com/docker-library/python/issues/365
114+
ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
115+
# https://github.com/pypa/get-pip
116+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/d781367b97acf0ece7e9e304bf281e99b618bf10/public/get-pip.py
117+
ENV PYTHON_GET_PIP_SHA256 01249aa3e58ffb3e1686b7141b4e9aac4d398ef4ac3012ed9dff8dd9f685ffe0
118+
119+
RUN set -ex; \
120+
\
121+
savedAptMark="$(apt-mark showmanual)"; \
122+
apt-get update; \
123+
apt-get install -y --no-install-recommends wget; \
124+
\
125+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
126+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
127+
\
128+
apt-mark auto '.*' > /dev/null; \
129+
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
130+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
131+
rm -rf /var/lib/apt/lists/*; \
132+
\
133+
python get-pip.py \
134+
--disable-pip-version-check \
135+
--no-cache-dir \
136+
"pip==$PYTHON_PIP_VERSION" \
137+
"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
138+
; \
139+
pip --version; \
140+
\
141+
find /usr/local -depth \
142+
\( \
143+
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
144+
-o \
145+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
146+
\) -exec rm -rf '{}' +; \
147+
rm -f get-pip.py
148+
149+
CMD ["python3"]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy