Created
August 12, 2014 00:08
-
-
Save sprin/84396766cc51b2f43ddf to your computer and use it in GitHub Desktop.
Python 2.7.8 on Centos 5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM tianon/centos:5.8 | |
RUN yum install -y curl tar gcc make xz | |
RUN mkdir /usr/src/python | |
WORKDIR /usr/src/python | |
RUN curl -Sl "https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tar.xz" > Python-2.7.8.tar.xz | |
RUN xz -dc < Python-2.7.8.tar.xz > Python-2.7.8.tar | |
RUN tar -xvf Python-2.7.8.tar -C /usr/src/python --strip-components=1 | |
# You may want to verify the download with gpg: https://www.python.org/download | |
RUN ./configure --prefix=/usr/local \ | |
&& make | |
RUN make install \ | |
&& make clean |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bash-3.2# cat /etc/redhat-release | |
CentOS release 5.8 (Final) | |
# System Python remains intact | |
bash-3.2# /usr/bin/python -c 'import sys; print sys.version' | |
2.4.3 (#1, Jan 9 2013, 06:47:03) | |
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] | |
# Python 2.7.8 is compiled and installed to /usr/local | |
bash-3.2# /usr/local/bin/python2.7 --version | |
Python 2.7.8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment