From 74aa4d8173580ef58a7cf207d168bd49bb87c8c6 Mon Sep 17 00:00:00 2001 From: ww-github Date: Thu, 14 Oct 2021 09:06:18 +0300 Subject: [PATCH] fix: make sure to use python2 and pip2 --- Dockerfile | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 573912c..7ac1a82 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,18 +5,23 @@ ARG AWS_VERSION=2.2.41 ENV S3_PREFIX="v3/" # Install build tools -RUN apt-get update \ - && apt-get upgrade \ - && apt-get install --no-install-recommends -yy \ +RUN apt-get update -y \ + && apt-get upgrade -y \ + && apt-get install --no-install-recommends -y \ curl \ unzip \ - python \ - python-pip \ - python-dev \ + python2 \ + python2-dev \ + python-is-python2 \ gcc \ libpq-dev \ postgresql-server-dev-13 +# Install pip2 +RUN curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py \ + && python2 get-pip.py \ + && rm get-pip.py + # Install AWS CLI tools RUN cd /tmp \ && curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${AWS_VERSION}.zip" -o "awscliv2.zip" \ @@ -31,10 +36,9 @@ RUN pip install -U pip \ && pip install psycopg2 # Remove build tools -RUN apt-get remove --purge -yy \ +RUN apt-get remove --purge -y \ unzip \ - python-pip \ - python-dev \ + python2-dev \ gcc \ libpq-dev \ postgresql-server-dev-13 \ @@ -42,7 +46,7 @@ RUN apt-get remove --purge -yy \ # Check the installation RUN aws --version \ - && python --version + && python2 --version WORKDIR /app