Skip to content

Commit

Permalink
Merge pull request #1 from DmitriySelischev/master
Browse files Browse the repository at this point in the history
python 3.5.6 with so enabled
  • Loading branch information
knorrus authored Aug 21, 2018
2 parents 29dcfcb + cad7628 commit 315d9b4
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,33 @@ 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

# Create virtual environment
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

Expand Down

0 comments on commit 315d9b4

Please sign in to comment.