Skip to content

Commit f154e5d

Browse files
authored
Add Debian 11 (Bullseye) and drop Debian 9 (Stretch) (docker-library#633)
1 parent 9c6007b commit f154e5d

File tree

12 files changed

+739
-9
lines changed

12 files changed

+739
-9
lines changed

3.10-rc/bullseye/Dockerfile

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
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.10.0rc1
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/pypa/get-pip
74+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/c20b0cfd643cd4a19246ccf204e2997af70f6b21/public/get-pip.py
75+
ENV PYTHON_GET_PIP_SHA256 fa6f3fb93cce234cd4e8dd2beb54a51ab9c247653b52855a48dd44e6b21ff28b
76+
77+
RUN set -ex; \
78+
\
79+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
80+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
81+
\
82+
python get-pip.py \
83+
--disable-pip-version-check \
84+
--no-cache-dir \
85+
"pip==$PYTHON_PIP_VERSION" \
86+
; \
87+
pip --version; \
88+
\
89+
find /usr/local -depth \
90+
\( \
91+
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
92+
-o \
93+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
94+
\) -exec rm -rf '{}' +; \
95+
rm -f get-pip.py
96+
97+
CMD ["python3"]

3.10-rc/bullseye/slim/Dockerfile

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
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.10.0rc1
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/pypa/get-pip
114+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/c20b0cfd643cd4a19246ccf204e2997af70f6b21/public/get-pip.py
115+
ENV PYTHON_GET_PIP_SHA256 fa6f3fb93cce234cd4e8dd2beb54a51ab9c247653b52855a48dd44e6b21ff28b
116+
117+
RUN set -ex; \
118+
\
119+
savedAptMark="$(apt-mark showmanual)"; \
120+
apt-get update; \
121+
apt-get install -y --no-install-recommends wget; \
122+
\
123+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
124+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
125+
\
126+
apt-mark auto '.*' > /dev/null; \
127+
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
128+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
129+
rm -rf /var/lib/apt/lists/*; \
130+
\
131+
python get-pip.py \
132+
--disable-pip-version-check \
133+
--no-cache-dir \
134+
"pip==$PYTHON_PIP_VERSION" \
135+
; \
136+
pip --version; \
137+
\
138+
find /usr/local -depth \
139+
\( \
140+
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
141+
-o \
142+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
143+
\) -exec rm -rf '{}' +; \
144+
rm -f get-pip.py
145+
146+
CMD ["python3"]

3.6/stretch/Dockerfile renamed to 3.6/bullseye/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# PLEASE DO NOT EDIT IT DIRECTLY.
55
#
66

7-
FROM buildpack-deps:stretch
7+
FROM buildpack-deps:bullseye
88

99
# ensure local python is preferred over distribution python
1010
ENV PATH /usr/local/bin:$PATH

3.6/stretch/slim/Dockerfile renamed to 3.6/bullseye/slim/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# PLEASE DO NOT EDIT IT DIRECTLY.
55
#
66

7-
FROM debian:stretch-slim
7+
FROM debian:bullseye-slim
88

99
# ensure local python is preferred over distribution python
1010
ENV PATH /usr/local/bin:$PATH

3.7/stretch/Dockerfile renamed to 3.7/bullseye/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# PLEASE DO NOT EDIT IT DIRECTLY.
55
#
66

7-
FROM buildpack-deps:stretch
7+
FROM buildpack-deps:bullseye
88

99
# ensure local python is preferred over distribution python
1010
ENV PATH /usr/local/bin:$PATH

3.7/stretch/slim/Dockerfile renamed to 3.7/bullseye/slim/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# PLEASE DO NOT EDIT IT DIRECTLY.
55
#
66

7-
FROM debian:stretch-slim
7+
FROM debian:bullseye-slim
88

99
# ensure local python is preferred over distribution python
1010
ENV PATH /usr/local/bin:$PATH

3.8/bullseye/Dockerfile

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
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 E3FF2839C048B25C084DEBE9B26995E310250568
24+
ENV PYTHON_VERSION 3.8.11
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+
-o \( -type f -a -name 'wininst-*.exe' \) \
59+
\) -exec rm -rf '{}' + \
60+
\
61+
&& ldconfig \
62+
\
63+
&& python3 --version
64+
65+
# make some useful symlinks that are expected to exist
66+
RUN cd /usr/local/bin \
67+
&& ln -s idle3 idle \
68+
&& ln -s pydoc3 pydoc \
69+
&& ln -s python3 python \
70+
&& ln -s python3-config python-config
71+
72+
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
73+
ENV PYTHON_PIP_VERSION 21.2.4
74+
# https://github.com/pypa/get-pip
75+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/c20b0cfd643cd4a19246ccf204e2997af70f6b21/public/get-pip.py
76+
ENV PYTHON_GET_PIP_SHA256 fa6f3fb93cce234cd4e8dd2beb54a51ab9c247653b52855a48dd44e6b21ff28b
77+
78+
RUN set -ex; \
79+
\
80+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
81+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
82+
\
83+
python get-pip.py \
84+
--disable-pip-version-check \
85+
--no-cache-dir \
86+
"pip==$PYTHON_PIP_VERSION" \
87+
; \
88+
pip --version; \
89+
\
90+
find /usr/local -depth \
91+
\( \
92+
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
93+
-o \
94+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
95+
\) -exec rm -rf '{}' +; \
96+
rm -f get-pip.py
97+
98+
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