Skip to content

Instantly share code, notes, and snippets.

@djromero
Last active June 8, 2017 17:55
Show Gist options
  • Save djromero/e5cc7f5a7c393041a5a5ffa897e83976 to your computer and use it in GitHub Desktop.
Save djromero/e5cc7f5a7c393041a5a5ffa897e83976 to your computer and use it in GitHub Desktop.
CentOS 6.9 with Python 3.6.0
FROM centos:6
ENV PYTHON_VERSION "3.6.0"
RUN yum install -y gcc make zlib-devel openssl-devel sqlite-devel bzip2-devel \
&& curl -O https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz \
&& tar xvf Python-${PYTHON_VERSION}.tgz \
&& cd Python-${PYTHON_VERSION} \
&& ./configure --prefix=/usr/local \
&& make \
&& make install \
&& cd / \
&& rm -rf Python-${PYTHON_VERSION}* \
&& yum erase -y zlib-devel openssl-devel sqlite-devel bzip2-devel \
&& yum -y clean all \
&& rm -rf /var/lib/apt/lists/* \
&& echo Done
ENV PATH "/usr/local/bin:${PATH}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment