-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
53 lines (43 loc) · 1.18 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM whitewaterguide/postgres:1.1.0
ARG AWS_VERSION=2.2.41
ENV S3_PREFIX="v3/"
# Install build tools
RUN apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends -y \
curl \
unzip \
python2 \
python2-dev \
python-is-python2 \
gcc \
libpq-dev \
postgresql-server-dev-13
# Install pip2, since bullseye no longer provides it
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" \
&& unzip awscliv2.zip \
&& ./aws/install \
&& rm -rf ./*
# Install psycopg2 which is required for partmans scripts
RUN pip install -U pip \
&& pip install --upgrade setuptools \
&& pip install --upgrade wheel \
&& pip install psycopg2
# Remove build tools
RUN apt-get remove --purge -y \
unzip \
python2-dev \
gcc \
libpq-dev \
postgresql-server-dev-13 \
&& rm -rf /var/lib/apt/lists/*
# Check the installation
RUN aws --version \
&& python2 --version
WORKDIR /app
COPY ./*.sh ./