-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (25 loc) · 838 Bytes
/
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
# pull official base image
FROM python:3.11.4-slim-bullseye
# set work directory
WORKDIR /usr/src/app
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# install system dependencies
RUN apt-get update && apt-get install -y netcat libxml2-dev libxslt-dev gcc libpq-dev python3-dev python3-pip python3-venv python3-wheel build-essential \
pkg-config \
default-libmysqlclient-dev
# install dependencies
RUN pip install --upgrade pip
COPY ./requirements.txt .
# RUN pip install setuptools wheel
RUN pip install -r requirements.txt
# copy entrypoint.sh
COPY ./docker-files/entrypoint.sh .
RUN sed -i 's/\r$//g' /usr/src/app/entrypoint.sh
RUN chmod +x /usr/src/app/entrypoint.sh
# copy project
COPY . .
# run entrypoint.sh
# ENTRYPOINT ["/usr/src/app/entrypoint.sh"]
CMD ["/usr/src/app/entrypoint.sh"]