Skip to content

Commit cad7628

Browse files
author
dmitriy
committed
python 3.5.6 with so enabled
1 parent 29dcfcb commit cad7628

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Dockerfile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,33 @@ ENV APPLICATION_DIR="/srv/application"
55

66
# Install required packages
77
RUN yum update -y; yum clean all
8-
RUN yum-builddep -y python; yum -y install make postgresql-devel gcc \
9-
libtiff-devel libjpeg-devel libzip-devel freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel \
10-
libxslt-devel libxml2-devel; yum clean all
8+
RUN yum-builddep -y python; yum -y install make postgresql-devel gcc \
9+
libtiff-devel libjpeg-devel libzip-devel freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel \
10+
libxslt-devel libxml2-devel python-devel; yum clean all
1111

12-
ENV PYTHON_VERSION="3.5.3"
12+
ENV PYTHON_VERSION="3.5.6"
1313
# Downloading and building python
1414
RUN mkdir /tmp/python-build && cd /tmp/python-build && \
1515
curl https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz > python.tgz && \
1616
tar xzf python.tgz && cd Python-$PYTHON_VERSION && \
17-
./configure --prefix=/usr/local && make install && cd / && rm -rf /tmp/python-build
17+
./configure --prefix=/usr/local --enable-shared && make install && cd / && rm -rf /tmp/python-build
1818

1919
# Install locale
2020
RUN localedef -v -c -i en_US -f UTF-8 en_US.UTF-8 || true
2121
ENV LC_ALL "en_US.UTF-8"
2222

23+
ENV LD_LIBRARY_PATH "$LD_LIBRARY_PATH:/usr/local/lib"
24+
2325
# install virtualenv
2426
RUN pip3 install virtualenv
2527

2628
# Create virtual environment
2729
RUN cd /srv \
2830
&& virtualenv --python=python3 virtenv \
2931
&& chown -R app:app /srv/virtenv
30-
32+
3133
RUN mkdir $APPLICATION_DIR && chown -R app:app $APPLICATION_DIR && cd $APPLICATION_DIR
32-
34+
3335
USER app
3436
WORKDIR $APPLICATION_DIR
3537

0 commit comments

Comments
 (0)