Skip to content

Commit d4c07d9

Browse files
reza-ebrahimitianon
authored andcommitted
Add stretch to v3.5
1 parent 5899357 commit d4c07d9

File tree

2 files changed

+219
-0
lines changed

2 files changed

+219
-0
lines changed

3.5/stretch/Dockerfile

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
7+
FROM buildpack-deps:stretch
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+
tcl \
19+
tk \
20+
&& rm -rf /var/lib/apt/lists/*
21+
22+
ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D
23+
ENV PYTHON_VERSION 3.5.5
24+
25+
RUN set -ex \
26+
&& buildDeps=' \
27+
dpkg-dev \
28+
tcl-dev \
29+
tk-dev \
30+
' \
31+
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
32+
\
33+
&& wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
34+
&& wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
35+
&& export GNUPGHOME="$(mktemp -d)" \
36+
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
37+
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
38+
&& rm -rf "$GNUPGHOME" python.tar.xz.asc \
39+
&& mkdir -p /usr/src/python \
40+
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
41+
&& rm python.tar.xz \
42+
\
43+
&& cd /usr/src/python \
44+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
45+
&& ./configure \
46+
--build="$gnuArch" \
47+
--enable-loadable-sqlite-extensions \
48+
--enable-shared \
49+
--with-system-expat \
50+
--with-system-ffi \
51+
--without-ensurepip \
52+
&& make -j "$(nproc)" \
53+
&& make install \
54+
&& ldconfig \
55+
\
56+
&& apt-get purge -y --auto-remove $buildDeps \
57+
\
58+
&& find /usr/local -depth \
59+
\( \
60+
\( -type d -a \( -name test -o -name tests \) \) \
61+
-o \
62+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
63+
\) -exec rm -rf '{}' + \
64+
&& rm -rf /usr/src/python
65+
66+
# make some useful symlinks that are expected to exist
67+
RUN cd /usr/local/bin \
68+
&& ln -s idle3 idle \
69+
&& ln -s pydoc3 pydoc \
70+
&& ln -s python3 python \
71+
&& ln -s python3-config python-config
72+
73+
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
74+
ENV PYTHON_PIP_VERSION 10.0.1
75+
76+
RUN set -ex; \
77+
\
78+
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
79+
\
80+
python get-pip.py \
81+
--disable-pip-version-check \
82+
--no-cache-dir \
83+
"pip==$PYTHON_PIP_VERSION" \
84+
; \
85+
pip --version; \
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 -f get-pip.py
94+
95+
CMD ["python3"]

3.5/stretch/slim/Dockerfile

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
7+
FROM debian:stretch-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+
libexpat1 \
20+
libffi6 \
21+
libgdbm3 \
22+
libreadline7 \
23+
libsqlite3-0 \
24+
libssl1.1 \
25+
netbase \
26+
&& rm -rf /var/lib/apt/lists/*
27+
28+
ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D
29+
ENV PYTHON_VERSION 3.5.5
30+
31+
RUN set -ex \
32+
&& buildDeps=" \
33+
dpkg-dev \
34+
gcc \
35+
libbz2-dev \
36+
libc6-dev \
37+
libexpat1-dev \
38+
libffi-dev \
39+
libgdbm-dev \
40+
liblzma-dev \
41+
libncursesw5-dev \
42+
libreadline-dev \
43+
libsqlite3-dev \
44+
libssl-dev \
45+
make \
46+
tcl-dev \
47+
tk-dev \
48+
wget \
49+
xz-utils \
50+
zlib1g-dev \
51+
# as of Stretch, "gpg" is no longer included by default
52+
$(command -v gpg > /dev/null || echo 'gnupg dirmngr') \
53+
" \
54+
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
55+
\
56+
&& wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
57+
&& wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
58+
&& export GNUPGHOME="$(mktemp -d)" \
59+
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
60+
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
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-shared \
72+
--with-system-expat \
73+
--with-system-ffi \
74+
--without-ensurepip \
75+
&& make -j "$(nproc)" \
76+
&& make install \
77+
&& ldconfig \
78+
\
79+
&& apt-get purge -y --auto-remove $buildDeps \
80+
\
81+
&& find /usr/local -depth \
82+
\( \
83+
\( -type d -a \( -name test -o -name tests \) \) \
84+
-o \
85+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
86+
\) -exec rm -rf '{}' + \
87+
&& rm -rf /usr/src/python
88+
89+
# make some useful symlinks that are expected to exist
90+
RUN cd /usr/local/bin \
91+
&& ln -s idle3 idle \
92+
&& ln -s pydoc3 pydoc \
93+
&& ln -s python3 python \
94+
&& ln -s python3-config python-config
95+
96+
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
97+
ENV PYTHON_PIP_VERSION 10.0.1
98+
99+
RUN set -ex; \
100+
\
101+
apt-get update; \
102+
apt-get install -y --no-install-recommends wget; \
103+
rm -rf /var/lib/apt/lists/*; \
104+
\
105+
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
106+
\
107+
apt-get purge -y --auto-remove wget; \
108+
\
109+
python get-pip.py \
110+
--disable-pip-version-check \
111+
--no-cache-dir \
112+
"pip==$PYTHON_PIP_VERSION" \
113+
; \
114+
pip --version; \
115+
\
116+
find /usr/local -depth \
117+
\( \
118+
\( -type d -a \( -name test -o -name tests \) \) \
119+
-o \
120+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
121+
\) -exec rm -rf '{}' +; \
122+
rm -f get-pip.py
123+
124+
CMD ["python3"]

0 commit comments

Comments
 (0)