1
+ #
2
+ # NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3
+ #
4
+ # PLEASE DO NOT EDIT IT DIRECTLY.
5
+ #
6
+
1
7
FROM buildpack-deps:jessie
2
8
3
- # ensure local python is used over debian python
9
+ # ensure local python is preferred over distribution python
4
10
ENV PATH /usr/local/bin:$PATH
5
11
6
12
# http://bugs.python.org/issue19846
7
13
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
8
14
ENV LANG C.UTF-8
9
15
10
- # gpg: key 36580288: public key "Georg Brandl (Python release signing key) <[email protected] >" 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/*
12
21
22
+ ENV GPG_KEY 26DEA9D4613391EF3E25C9FF0A5B101836580288
13
23
ENV PYTHON_VERSION 3.3.6
14
24
15
25
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
@@ -20,13 +30,10 @@ RUN set -ex \
20
30
tcl-dev \
21
31
tk-dev \
22
32
' \
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" \
30
37
&& export GNUPGHOME="$(mktemp -d)" \
31
38
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
32
39
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
@@ -42,9 +49,16 @@ RUN set -ex \
42
49
&& make -j$(nproc) \
43
50
&& make install \
44
51
&& 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
+ \
48
62
&& find /usr/local -depth \
49
63
\( \
50
64
\( -type d -a -name test -o -name tests \) \
@@ -56,6 +70,7 @@ RUN set -ex \
56
70
57
71
# make some useful symlinks that are expected to exist
58
72
RUN cd /usr/local/bin \
73
+ && { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
59
74
&& ln -s idle3 idle \
60
75
&& ln -s pydoc3 pydoc \
61
76
&& ln -s python3 python \
0 commit comments