python_sonar/3.3/Dockerfile

30 lines
733 B
Docker
Raw Normal View History

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-09-18 01:48:15 +08:00
ENV PYTHON_VERSION 3.3.5
RUN curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
| 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 pip3 pip \
&& ln -s pydoc3 pydoc \
&& ln -s python3 python \
&& ln -s python-config3 python-config
CMD ["python3"]