Skip to content

Commit 13ae0c0

Browse files
authored
Merge pull request #405 from J0WI/buster
Add Debian Buster and remove Jessie
2 parents a12a97a + 2a11f61 commit 13ae0c0

File tree

11 files changed

+619
-21
lines changed

11 files changed

+619
-21
lines changed

.travis.yml

+16-12
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ matrix:
1515
- os: windows
1616
dist: 1803-containers
1717
env: VERSION=3.7 VARIANT=windows/windowsservercore-1803
18+
- os: linux
19+
env: VERSION=3.7 VARIANT=buster
20+
- os: linux
21+
env: VERSION=3.7 VARIANT=buster/slim
1822
- os: linux
1923
env: VERSION=3.7 VARIANT=stretch
2024
- os: linux
@@ -24,25 +28,25 @@ matrix:
2428
- os: linux
2529
env: VERSION=3.7 VARIANT=alpine3.9
2630
- os: linux
27-
env: VERSION=3.6 VARIANT=stretch
31+
env: VERSION=3.6 VARIANT=buster
2832
- os: linux
29-
env: VERSION=3.6 VARIANT=stretch/slim
33+
env: VERSION=3.6 VARIANT=buster/slim
3034
- os: linux
31-
env: VERSION=3.6 VARIANT=jessie
35+
env: VERSION=3.6 VARIANT=stretch
3236
- os: linux
33-
env: VERSION=3.6 VARIANT=jessie/slim
37+
env: VERSION=3.6 VARIANT=stretch/slim
3438
- os: linux
3539
env: VERSION=3.6 VARIANT=alpine3.10
3640
- os: linux
3741
env: VERSION=3.6 VARIANT=alpine3.9
3842
- os: linux
39-
env: VERSION=3.5 VARIANT=stretch
43+
env: VERSION=3.5 VARIANT=buster
4044
- os: linux
41-
env: VERSION=3.5 VARIANT=stretch/slim
45+
env: VERSION=3.5 VARIANT=buster/slim
4246
- os: linux
43-
env: VERSION=3.5 VARIANT=jessie
47+
env: VERSION=3.5 VARIANT=stretch
4448
- os: linux
45-
env: VERSION=3.5 VARIANT=jessie/slim
49+
env: VERSION=3.5 VARIANT=stretch/slim
4650
- os: linux
4751
env: VERSION=3.5 VARIANT=alpine3.10
4852
- os: linux
@@ -51,13 +55,13 @@ matrix:
5155
dist: 1803-containers
5256
env: VERSION=2.7 VARIANT=windows/windowsservercore-1803
5357
- os: linux
54-
env: VERSION=2.7 VARIANT=stretch
58+
env: VERSION=2.7 VARIANT=buster
5559
- os: linux
56-
env: VERSION=2.7 VARIANT=stretch/slim
60+
env: VERSION=2.7 VARIANT=buster/slim
5761
- os: linux
58-
env: VERSION=2.7 VARIANT=jessie
62+
env: VERSION=2.7 VARIANT=stretch
5963
- os: linux
60-
env: VERSION=2.7 VARIANT=jessie/slim
64+
env: VERSION=2.7 VARIANT=stretch/slim
6165
- os: linux
6266
env: VERSION=2.7 VARIANT=alpine3.10
6367
- os: linux

2.7/jessie/Dockerfile renamed to 2.7/buster/Dockerfile

+1-1
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:jessie
7+
FROM buildpack-deps:buster
88

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

2.7/jessie/slim/Dockerfile renamed to 2.7/buster/slim/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# PLEASE DO NOT EDIT IT DIRECTLY.
55
#
66

7-
FROM debian:jessie-slim
7+
FROM debian:buster-slim
88

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

3.5/jessie/Dockerfile renamed to 3.5/buster/Dockerfile

+1-1
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:jessie
7+
FROM buildpack-deps:buster
88

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

3.5/jessie/slim/Dockerfile renamed to 3.5/buster/slim/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# PLEASE DO NOT EDIT IT DIRECTLY.
55
#
66

7-
FROM debian:jessie-slim
7+
FROM debian:buster-slim
88

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

3.6/buster/Dockerfile

+126
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
7+
FROM buildpack-deps:buster
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+
tk-dev \
19+
&& rm -rf /var/lib/apt/lists/*
20+
21+
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
22+
ENV PYTHON_VERSION 3.6.9
23+
24+
RUN set -ex \
25+
\
26+
&& wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
27+
&& wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
28+
&& export GNUPGHOME="$(mktemp -d)" \
29+
&& gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
30+
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
31+
&& { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
32+
&& rm -rf "$GNUPGHOME" python.tar.xz.asc \
33+
&& mkdir -p /usr/src/python \
34+
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
35+
&& rm python.tar.xz \
36+
\
37+
&& cd /usr/src/python \
38+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
39+
&& ./configure \
40+
--build="$gnuArch" \
41+
--enable-loadable-sqlite-extensions \
42+
--enable-optimizations \
43+
--enable-shared \
44+
--with-system-expat \
45+
--with-system-ffi \
46+
--without-ensurepip \
47+
&& make -j "$(nproc)" \
48+
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
49+
PROFILE_TASK='-m test.regrtest --pgo \
50+
test_array \
51+
test_base64 \
52+
test_binascii \
53+
test_binhex \
54+
test_binop \
55+
test_bytes \
56+
test_c_locale_coercion \
57+
test_class \
58+
test_cmath \
59+
test_codecs \
60+
test_compile \
61+
test_complex \
62+
test_csv \
63+
test_decimal \
64+
test_dict \
65+
test_float \
66+
test_fstring \
67+
test_hashlib \
68+
test_io \
69+
test_iter \
70+
test_json \
71+
test_long \
72+
test_math \
73+
test_memoryview \
74+
test_pickle \
75+
test_re \
76+
test_set \
77+
test_slice \
78+
test_struct \
79+
test_threading \
80+
test_time \
81+
test_traceback \
82+
test_unicode \
83+
' \
84+
&& make install \
85+
&& ldconfig \
86+
\
87+
&& find /usr/local -depth \
88+
\( \
89+
\( -type d -a \( -name test -o -name tests \) \) \
90+
-o \
91+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
92+
\) -exec rm -rf '{}' + \
93+
&& rm -rf /usr/src/python \
94+
\
95+
&& python3 --version
96+
97+
# make some useful symlinks that are expected to exist
98+
RUN cd /usr/local/bin \
99+
&& ln -s idle3 idle \
100+
&& ln -s pydoc3 pydoc \
101+
&& ln -s python3 python \
102+
&& ln -s python3-config python-config
103+
104+
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
105+
ENV PYTHON_PIP_VERSION 19.1.1
106+
107+
RUN set -ex; \
108+
\
109+
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
110+
\
111+
python get-pip.py \
112+
--disable-pip-version-check \
113+
--no-cache-dir \
114+
"pip==$PYTHON_PIP_VERSION" \
115+
; \
116+
pip --version; \
117+
\
118+
find /usr/local -depth \
119+
\( \
120+
\( -type d -a \( -name test -o -name tests \) \) \
121+
-o \
122+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
123+
\) -exec rm -rf '{}' +; \
124+
rm -f get-pip.py
125+
126+
CMD ["python3"]

3.6/buster/slim/Dockerfile

+170
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
7+
FROM debian:buster-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 apt-get update && apt-get install -y --no-install-recommends \
18+
ca-certificates \
19+
netbase \
20+
&& rm -rf /var/lib/apt/lists/*
21+
22+
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
23+
ENV PYTHON_VERSION 3.6.9
24+
25+
RUN set -ex \
26+
\
27+
&& savedAptMark="$(apt-mark showmanual)" \
28+
&& apt-get update && apt-get install -y --no-install-recommends \
29+
dpkg-dev \
30+
gcc \
31+
libbz2-dev \
32+
libc6-dev \
33+
libexpat1-dev \
34+
libffi-dev \
35+
libgdbm-dev \
36+
liblzma-dev \
37+
libncursesw5-dev \
38+
libreadline-dev \
39+
libsqlite3-dev \
40+
libssl-dev \
41+
make \
42+
tk-dev \
43+
wget \
44+
xz-utils \
45+
zlib1g-dev \
46+
# as of Stretch, "gpg" is no longer included by default
47+
$(command -v gpg > /dev/null || echo 'gnupg dirmngr') \
48+
\
49+
&& wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
50+
&& wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
51+
&& export GNUPGHOME="$(mktemp -d)" \
52+
&& gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
53+
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
54+
&& { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
55+
&& rm -rf "$GNUPGHOME" python.tar.xz.asc \
56+
&& mkdir -p /usr/src/python \
57+
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
58+
&& rm python.tar.xz \
59+
\
60+
&& cd /usr/src/python \
61+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
62+
&& ./configure \
63+
--build="$gnuArch" \
64+
--enable-loadable-sqlite-extensions \
65+
--enable-optimizations \
66+
--enable-shared \
67+
--with-system-expat \
68+
--with-system-ffi \
69+
--without-ensurepip \
70+
&& make -j "$(nproc)" \
71+
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
72+
PROFILE_TASK='-m test.regrtest --pgo \
73+
test_array \
74+
test_base64 \
75+
test_binascii \
76+
test_binhex \
77+
test_binop \
78+
test_bytes \
79+
test_c_locale_coercion \
80+
test_class \
81+
test_cmath \
82+
test_codecs \
83+
test_compile \
84+
test_complex \
85+
test_csv \
86+
test_decimal \
87+
test_dict \
88+
test_float \
89+
test_fstring \
90+
test_hashlib \
91+
test_io \
92+
test_iter \
93+
test_json \
94+
test_long \
95+
test_math \
96+
test_memoryview \
97+
test_pickle \
98+
test_re \
99+
test_set \
100+
test_slice \
101+
test_struct \
102+
test_threading \
103+
test_time \
104+
test_traceback \
105+
test_unicode \
106+
' \
107+
&& make install \
108+
&& ldconfig \
109+
\
110+
&& apt-mark auto '.*' > /dev/null \
111+
&& apt-mark manual $savedAptMark \
112+
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
113+
| awk '/=>/ { print $(NF-1) }' \
114+
| sort -u \
115+
| xargs -r dpkg-query --search \
116+
| cut -d: -f1 \
117+
| sort -u \
118+
| xargs -r apt-mark manual \
119+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
120+
&& rm -rf /var/lib/apt/lists/* \
121+
\
122+
&& find /usr/local -depth \
123+
\( \
124+
\( -type d -a \( -name test -o -name tests \) \) \
125+
-o \
126+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
127+
\) -exec rm -rf '{}' + \
128+
&& rm -rf /usr/src/python \
129+
\
130+
&& python3 --version
131+
132+
# make some useful symlinks that are expected to exist
133+
RUN cd /usr/local/bin \
134+
&& ln -s idle3 idle \
135+
&& ln -s pydoc3 pydoc \
136+
&& ln -s python3 python \
137+
&& ln -s python3-config python-config
138+
139+
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
140+
ENV PYTHON_PIP_VERSION 19.1.1
141+
142+
RUN set -ex; \
143+
\
144+
savedAptMark="$(apt-mark showmanual)"; \
145+
apt-get update; \
146+
apt-get install -y --no-install-recommends wget; \
147+
\
148+
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
149+
\
150+
apt-mark auto '.*' > /dev/null; \
151+
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
152+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
153+
rm -rf /var/lib/apt/lists/*; \
154+
\
155+
python get-pip.py \
156+
--disable-pip-version-check \
157+
--no-cache-dir \
158+
"pip==$PYTHON_PIP_VERSION" \
159+
; \
160+
pip --version; \
161+
\
162+
find /usr/local -depth \
163+
\( \
164+
\( -type d -a \( -name test -o -name tests \) \) \
165+
-o \
166+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
167+
\) -exec rm -rf '{}' +; \
168+
rm -f get-pip.py
169+
170+
CMD ["python3"]

0 commit comments

Comments
 (0)