From cad762813313fdf0586a8b84410a9c2ddb15340d Mon Sep 17 00:00:00 2001 From: dmitriy Date: Tue, 21 Aug 2018 15:10:27 +0300 Subject: [PATCH] python 3.5.6 with so enabled --- Dockerfile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 87f6407..28d3cc5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,21 +5,23 @@ ENV APPLICATION_DIR="/srv/application" # Install required packages RUN yum update -y; yum clean all -RUN yum-builddep -y python; yum -y install make postgresql-devel gcc \ - libtiff-devel libjpeg-devel libzip-devel freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel \ - libxslt-devel libxml2-devel; yum clean all +RUN yum-builddep -y python; yum -y install make postgresql-devel gcc \ + libtiff-devel libjpeg-devel libzip-devel freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel \ + libxslt-devel libxml2-devel python-devel; yum clean all -ENV PYTHON_VERSION="3.5.3" +ENV PYTHON_VERSION="3.5.6" # Downloading and building python RUN mkdir /tmp/python-build && cd /tmp/python-build && \ curl https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz > python.tgz && \ tar xzf python.tgz && cd Python-$PYTHON_VERSION && \ - ./configure --prefix=/usr/local && make install && cd / && rm -rf /tmp/python-build + ./configure --prefix=/usr/local --enable-shared && make install && cd / && rm -rf /tmp/python-build # Install locale RUN localedef -v -c -i en_US -f UTF-8 en_US.UTF-8 || true ENV LC_ALL "en_US.UTF-8" +ENV LD_LIBRARY_PATH "$LD_LIBRARY_PATH:/usr/local/lib" + # install virtualenv RUN pip3 install virtualenv @@ -27,9 +29,9 @@ RUN pip3 install virtualenv RUN cd /srv \ && virtualenv --python=python3 virtenv \ && chown -R app:app /srv/virtenv - + RUN mkdir $APPLICATION_DIR && chown -R app:app $APPLICATION_DIR && cd $APPLICATION_DIR - + USER app WORKDIR $APPLICATION_DIR