-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (22 loc) · 906 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
FROM python:3.12.1-slim-bookworm
ENV PYTHONUNBUFFERED 1
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get -y install --no-install-recommends curl=7.88.1-10+deb12u5 vim=2:9.0.1378-2 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt /
RUN pip install --upgrade --no-cache-dir 'pip>=24.0' && \
pip install --no-cache-dir -r /requirements.txt
COPY requirements-dev.txt /apps/req/requirements-dev.txt
WORKDIR /apps/req
RUN pip install --no-cache-dir -r requirements-dev.txt
# FIX: bug on corsheaders
# RUN echo 'import django.dispatch;check_request_enabled = django.dispatch.Signal()' > /usr/local/lib/python3.10/site-packages/corsheaders/signals.py
COPY src /apps/app
WORKDIR /apps/app
RUN python manage.py collectstatic --noinput
EXPOSE 8000
# ENTRYPOINT [ "executable" ]
WORKDIR /apps/app
CMD ["python", "manage.py", "runserver_plus", "0.0.0.0:80"]