Skip to content

Commit 9a9021f

Browse files
committed
Apply update.sh (templates)
1 parent b3269e5 commit 9a9021f

File tree

14 files changed

+324
-119
lines changed

14 files changed

+324
-119
lines changed

3.3/Dockerfile

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
17
FROM buildpack-deps:jessie
28

3-
# ensure local python is used over debian python
9+
# ensure local python is preferred over distribution python
410
ENV PATH /usr/local/bin:$PATH
511

612
# http://bugs.python.org/issue19846
713
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
814
ENV LANG C.UTF-8
915

10-
# gpg: key 36580288: public key "Georg Brandl (Python release signing key) <georg@python.org>" imported
11-
ENV GPG_KEY 26DEA9D4613391EF3E25C9FF0A5B101836580288
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/*
1221

22+
ENV GPG_KEY 26DEA9D4613391EF3E25C9FF0A5B101836580288
1323
ENV PYTHON_VERSION 3.3.6
1424

1525
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
@@ -20,13 +30,10 @@ RUN set -ex \
2030
tcl-dev \
2131
tk-dev \
2232
' \
23-
&& runDeps=' \
24-
tcl \
25-
tk \
26-
' \
27-
&& apt-get update && apt-get install -y $runDeps $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
28-
&& curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \
29-
&& curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \
33+
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
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" \
3037
&& export GNUPGHOME="$(mktemp -d)" \
3138
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
3239
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
@@ -42,9 +49,16 @@ RUN set -ex \
4249
&& make -j$(nproc) \
4350
&& make install \
4451
&& ldconfig \
45-
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \
46-
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
47-
&& [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
52+
\
53+
# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere
54+
&& if [ ! -e /usr/local/bin/pip3 ]; then : \
55+
&& wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
56+
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
57+
&& rm /tmp/get-pip.py \
58+
; fi \
59+
&& pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
60+
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
61+
\
4862
&& find /usr/local -depth \
4963
\( \
5064
\( -type d -a -name test -o -name tests \) \
@@ -56,6 +70,7 @@ RUN set -ex \
5670

5771
# make some useful symlinks that are expected to exist
5872
RUN cd /usr/local/bin \
73+
&& { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
5974
&& ln -s idle3 idle \
6075
&& ln -s pydoc3 pydoc \
6176
&& ln -s python3 python \

3.3/alpine/Dockerfile

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
17
FROM alpine:3.4
28

9+
# ensure local python is preferred over distribution python
10+
ENV PATH /usr/local/bin:$PATH
11+
312
# http://bugs.python.org/issue19846
413
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
514
ENV LANG C.UTF-8
@@ -8,18 +17,21 @@ ENV LANG C.UTF-8
817
# the other runtime dependencies for Python are installed later
918
RUN apk add --no-cache ca-certificates
1019

11-
# gpg: key 36580288: public key "Georg Brandl (Python release signing key) <georg@python.org>" imported
1220
ENV GPG_KEY 26DEA9D4613391EF3E25C9FF0A5B101836580288
13-
1421
ENV PYTHON_VERSION 3.3.6
1522

1623
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
1724
ENV PYTHON_PIP_VERSION 8.1.2
1825

1926
RUN set -ex \
20-
&& apk add --no-cache --virtual .fetch-deps curl gnupg tar xz \
21-
&& curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \
22-
&& curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \
27+
&& apk add --no-cache --virtual .fetch-deps \
28+
gnupg \
29+
openssl \
30+
tar \
31+
xz \
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" \
2335
&& export GNUPGHOME="$(mktemp -d)" \
2436
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
2537
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
@@ -35,6 +47,7 @@ RUN set -ex \
3547
linux-headers \
3648
make \
3749
ncurses-dev \
50+
openssl \
3851
openssl-dev \
3952
pax-utils \
4053
readline-dev \
@@ -44,15 +57,25 @@ RUN set -ex \
4457
tk-dev \
4558
xz-dev \
4659
zlib-dev \
60+
# add build deps before removing fetch deps in case there's overlap
61+
&& apk del .fetch-deps \
62+
\
4763
&& cd /usr/src/python \
4864
&& ./configure \
4965
--enable-loadable-sqlite-extensions \
5066
--enable-shared \
5167
&& make -j$(getconf _NPROCESSORS_ONLN) \
5268
&& make install \
53-
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \
54-
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
55-
&& [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
69+
\
70+
# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere
71+
&& if [ ! -e /usr/local/bin/pip3 ]; then : \
72+
&& wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
73+
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
74+
&& rm /tmp/get-pip.py \
75+
; fi \
76+
&& pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
77+
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
78+
\
5679
&& find /usr/local -depth \
5780
\( \
5881
\( -type d -a -name test -o -name tests \) \
@@ -67,11 +90,12 @@ RUN set -ex \
6790
| sort -u \
6891
)" \
6992
&& apk add --virtual .python-rundeps $runDeps \
70-
&& apk del .build-deps .fetch-deps \
93+
&& apk del .build-deps \
7194
&& rm -rf /usr/src/python ~/.cache
7295

7396
# make some useful symlinks that are expected to exist
7497
RUN cd /usr/local/bin \
98+
&& { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
7599
&& ln -s idle3 idle \
76100
&& ln -s pydoc3 pydoc \
77101
&& ln -s python3 python \

3.3/onbuild/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
17
FROM python:3.3
28

39
RUN mkdir -p /usr/src/app

3.3/slim/Dockerfile

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,33 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
17
FROM debian:jessie
28

3-
# ensure local python is used over debian python
9+
# ensure local python is preferred over distribution python
410
ENV PATH /usr/local/bin:$PATH
511

612
# http://bugs.python.org/issue19846
713
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
814
ENV LANG C.UTF-8
915

16+
# runtime dependencies
1017
RUN apt-get update && apt-get install -y --no-install-recommends \
1118
ca-certificates \
1219
libsqlite3-0 \
1320
libssl1.0.0 \
1421
&& rm -rf /var/lib/apt/lists/*
1522

16-
# gpg: key 36580288: public key "Georg Brandl (Python release signing key) <georg@python.org>" imported
1723
ENV GPG_KEY 26DEA9D4613391EF3E25C9FF0A5B101836580288
18-
1924
ENV PYTHON_VERSION 3.3.6
2025

2126
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
2227
ENV PYTHON_PIP_VERSION 8.1.2
2328

2429
RUN set -ex \
2530
&& buildDeps=' \
26-
curl \
2731
gcc \
2832
libbz2-dev \
2933
libc6-dev \
@@ -35,12 +39,14 @@ RUN set -ex \
3539
make \
3640
tcl-dev \
3741
tk-dev \
42+
wget \
3843
xz-utils \
3944
zlib1g-dev \
4045
' \
4146
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
42-
&& curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \
43-
&& curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \
47+
\
48+
&& wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
49+
&& wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
4450
&& export GNUPGHOME="$(mktemp -d)" \
4551
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
4652
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
@@ -56,9 +62,16 @@ RUN set -ex \
5662
&& make -j$(nproc) \
5763
&& make install \
5864
&& ldconfig \
59-
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \
60-
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
61-
&& [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
65+
\
66+
# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere
67+
&& if [ ! -e /usr/local/bin/pip3 ]; then : \
68+
&& wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
69+
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
70+
&& rm /tmp/get-pip.py \
71+
; fi \
72+
&& pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
73+
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
74+
\
6275
&& find /usr/local -depth \
6376
\( \
6477
\( -type d -a -name test -o -name tests \) \
@@ -70,6 +83,7 @@ RUN set -ex \
7083

7184
# make some useful symlinks that are expected to exist
7285
RUN cd /usr/local/bin \
86+
&& { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
7387
&& ln -s idle3 idle \
7488
&& ln -s pydoc3 pydoc \
7589
&& ln -s python3 python \

3.3/wheezy/Dockerfile

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
17
FROM buildpack-deps:wheezy
28

3-
# ensure local python is used over debian python
9+
# ensure local python is preferred over distribution python
410
ENV PATH /usr/local/bin:$PATH
511

612
# http://bugs.python.org/issue19846
713
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
814
ENV LANG C.UTF-8
915

10-
# gpg: key 36580288: public key "Georg Brandl (Python release signing key) <georg@python.org>" imported
11-
ENV GPG_KEY 26DEA9D4613391EF3E25C9FF0A5B101836580288
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/*
1221

22+
ENV GPG_KEY 26DEA9D4613391EF3E25C9FF0A5B101836580288
1323
ENV PYTHON_VERSION 3.3.6
1424

1525
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
@@ -20,13 +30,10 @@ RUN set -ex \
2030
tcl-dev \
2131
tk-dev \
2232
' \
23-
&& runDeps=' \
24-
tcl \
25-
tk \
26-
' \
27-
&& apt-get update && apt-get install -y $runDeps $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
28-
&& curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \
29-
&& curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \
33+
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
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" \
3037
&& export GNUPGHOME="$(mktemp -d)" \
3138
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
3239
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
@@ -42,9 +49,16 @@ RUN set -ex \
4249
&& make -j$(nproc) \
4350
&& make install \
4451
&& ldconfig \
45-
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \
46-
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
47-
&& [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
52+
\
53+
# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere
54+
&& if [ ! -e /usr/local/bin/pip3 ]; then : \
55+
&& wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
56+
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
57+
&& rm /tmp/get-pip.py \
58+
; fi \
59+
&& pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
60+
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
61+
\
4862
&& find /usr/local -depth \
4963
\( \
5064
\( -type d -a -name test -o -name tests \) \
@@ -56,6 +70,7 @@ RUN set -ex \
5670

5771
# make some useful symlinks that are expected to exist
5872
RUN cd /usr/local/bin \
73+
&& { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
5974
&& ln -s idle3 idle \
6075
&& ln -s pydoc3 pydoc \
6176
&& ln -s python3 python \

0 commit comments

Comments
 (0)