-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
32 lines (25 loc) · 1.01 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
FROM python:3.11-slim
# Prevents buffering for easier container logging
ENV PYTHONUNBUFFERED 1
# Install non python dependencies
RUN apt-get update --fix-missing
RUN apt-get install -y libpq-dev gcc curl gzip zip unzip postgresql-client
RUN apt-get clean
# Install AWS-CLI
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip \
&& ./aws/install \
&& rm -rf awscliv2.zip
# Fetch Amazon RDS certificate chain
RUN curl https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem -o /usr/local/share/amazon-certs.pem
RUN chmod a=r /usr/local/share/amazon-certs.pem
# Install poetry
RUN pip install -U pip
RUN pip install "poetry==1.7.1"
# copy poetry and pyproject files and install dependencies
WORKDIR /research_server_etl/
COPY pyproject.toml pyproject.toml
RUN poetry install --only main --no-interaction --no-ansi --no-root -v
# Copy src directory to run against and build app
COPY src src
RUN poetry install --only main --no-interaction --no-ansi -v