Skip to content

Instantly share code, notes, and snippets.

@bagpack
Last active April 28, 2017 10:21
Show Gist options
  • Save bagpack/a6fe1a5b4e376b048484f4fdbcacd386 to your computer and use it in GitHub Desktop.
Save bagpack/a6fe1a5b4e376b048484f4fdbcacd386 to your computer and use it in GitHub Desktop.
Dockerfile python3.6.0 in amazonlinux
FROM amazonlinux
WORKDIR /work
RUN set -x && \
yum -y install yum-plugin-fastestmirror && \
yum install -y gcc gcc-c++ make git openssl-devel bzip2-devel zlib-devel readline-devel sqlite-devel && \
yum install -y libtiff-devel libjpeg-devel libzip-devel freetype-devel \
lcms2-devel libwebp-devel tcl-devel tk-devel
RUN curl --remote-name --progress https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz && \
echo '2d0fc9f3a5940707590e07f03ecb08b9 Python-3.6.1.tgz' | md5sum -c - && \
tar zxf Python-3.6.1.tgz && \
cd Python-3.6.1 && \
./configure --prefix=/usr/local --enable-shared && \
make && \
make altinstall && \
echo '/usr/local/lib' > /etc/ld.so.conf.d/local-libs.conf && \
ldconfig && \
cd .. && \
rm -rf Python-3.6.1.tgz Python-3.6.1 && \
ln -s /usr/local/bin/pip3.6 /usr/local/bin/pip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment