-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (26 loc) · 765 Bytes
/
Dockerfile
File metadata and controls
34 lines (26 loc) · 765 Bytes
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
FROM python:3.11.9-slim
# Install system dependencies for psycopg2 and build tools
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libpq-dev \
python3-dev \
gcc \
libc6-dev \
&& rm -rf /var/lib/apt/lists/*
# install psycopg2 dependencies
RUN apt-get update && apt-get install -y
RUN apt-get install -y python3-psycopg2
# set work directory
WORKDIR /src
# set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# install dependencies
RUN pip install --upgrade pip
COPY ./requirements.txt .
RUN pip install -r requirements.txt
# copy entrypoint.sh
COPY ./docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
COPY ./cwsf .
ENTRYPOINT [ "bash", "/docker-entrypoint.sh" ]