Просмотр исходного кода

Upgrade python and pip versions in Dockerfile
Add libbz2 dependency

Signed-off-by: Joffrey F <[email protected]>

Joffrey F 8 лет назад
Родитель
Сommit
84774cacd2
1 измененных файлов с 9 добавлено и 16 удалено
  1. 9 16
      Dockerfile

+ 9 - 16
Dockerfile

@@ -13,6 +13,7 @@ RUN set -ex; \
         ca-certificates \
         curl \
         libsqlite3-dev \
+        libbz2-dev \
     ; \
     rm -rf /var/lib/apt/lists/*
 
@@ -20,40 +21,32 @@ RUN curl https://get.docker.com/builds/Linux/x86_64/docker-1.8.3 \
         -o /usr/local/bin/docker && \
     chmod +x /usr/local/bin/docker
 
-# Build Python 2.7.9 from source
+# Build Python 2.7.13 from source
 RUN set -ex; \
-    curl -L https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz | tar -xz; \
-    cd Python-2.7.9; \
+    curl -L https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz | tar -xz; \
+    cd Python-2.7.13; \
     ./configure --enable-shared; \
     make; \
     make install; \
     cd ..; \
-    rm -rf /Python-2.7.9
+    rm -rf /Python-2.7.13
 
 # Build python 3.4 from source
 RUN set -ex; \
-    curl -L https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tgz | tar -xz; \
-    cd Python-3.4.3; \
+    curl -L https://www.python.org/ftp/python/3.4.6/Python-3.4.6.tgz | tar -xz; \
+    cd Python-3.4.6; \
     ./configure --enable-shared; \
     make; \
     make install; \
     cd ..; \
-    rm -rf /Python-3.4.3
+    rm -rf /Python-3.4.6
 
 # Make libpython findable
 ENV LD_LIBRARY_PATH /usr/local/lib
 
-# Install setuptools
-RUN set -ex; \
-    curl -L https://bootstrap.pypa.io/ez_setup.py | python
-
 # Install pip
 RUN set -ex; \
-    curl -L https://pypi.python.org/packages/source/p/pip/pip-8.1.1.tar.gz | tar -xz; \
-    cd pip-8.1.1; \
-    python setup.py install; \
-    cd ..; \
-    rm -rf pip-8.1.1
+    curl -L https://bootstrap.pypa.io/get-pip.py | python
 
 # Python3 requires a valid locale
 RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen