1+ #
2+ # NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+ #
4+ # PLEASE DO NOT EDIT IT DIRECTLY.
5+ #
6+
17FROM buildpack-deps:jessie
28
3- # ensure local python is used over debian python
9+ # ensure local python is preferred over distribution python
410ENV 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.
814ENV 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
1323ENV 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
5872RUN 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