35 lines
935 B
Docker
35 lines
935 B
Docker
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
|
|
|
|
# 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
|
|
|
|
ENV PYTHON_VERSION 3.3.6
|
|
|
|
RUN curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
|
|
| tar -xJ --strip-components=1
|
|
RUN ./configure \
|
|
&& 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
|
|
|
|
RUN curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python3
|
|
|
|
CMD ["python3"]
|