Skip to content

Commit

Permalink
fix: make sure to use python2 and pip2
Browse files Browse the repository at this point in the history
  • Loading branch information
ww-github committed Oct 14, 2021
1 parent 0f1b944 commit 74aa4d8
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -31,18 +36,17 @@ 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 \
&& rm -rf /var/lib/apt/lists/*

# Check the installation
RUN aws --version \
&& python --version
&& python2 --version

WORKDIR /app

Expand Down

0 comments on commit 74aa4d8

Please sign in to comment.