2014-06-21 04:52:22 +08:00
|
|
|
FROM buildpack-deps
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y curl procps
|
|
|
|
|
|
|
|
# remove several traces of debian python
|
|
|
|
RUN apt-get purge -y python python-minimal python2.7-minimal
|
|
|
|
|
|
|
|
RUN mkdir /usr/src/python
|
|
|
|
WORKDIR /usr/src/python
|
2014-08-09 03:49:12 +08:00
|
|
|
|
2014-09-26 23:27:20 +08:00
|
|
|
# http://bugs.python.org/issue19846
|
|
|
|
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
|
|
|
|
ENV LANG C.UTF-8
|
|
|
|
|
2014-10-21 00:31:22 +08:00
|
|
|
ENV PYTHON_VERSION 3.3.6
|
2014-08-09 03:49:12 +08:00
|
|
|
|
|
|
|
RUN curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
|
2014-06-24 03:44:35 +08:00
|
|
|
| tar -xJ --strip-components=1
|
|
|
|
RUN ./configure \
|
2014-06-21 04:52:22 +08:00
|
|
|
&& make -j$(nproc) \
|
|
|
|
&& make install \
|
|
|
|
&& make clean
|
|
|
|
|
|
|
|
# make some useful symlinks that are expected to exist
|
|
|
|
RUN cd /usr/local/bin \
|
|
|
|
&& ln -s easy_install-3.4 easy_install \
|
|
|
|
&& ln -s idle3 idle \
|
|
|
|
&& ln -s pydoc3 pydoc \
|
|
|
|
&& ln -s python3 python \
|
|
|
|
&& ln -s python-config3 python-config
|
|
|
|
|
2014-09-27 04:52:39 +08:00
|
|
|
RUN curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python3
|
|
|
|
|
2014-06-21 07:15:38 +08:00
|
|
|
CMD ["python3"]
|