-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathDockerfile
35 lines (24 loc) · 1.09 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
# ------------------------------------------------------------
# Base/builder layer
# ------------------------------------------------------------
FROM python:3.13-slim-bookworm AS builder
ENV PIP_DISABLE_PIP_VERSION_CHECK 1
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONPATH /srv
ENV PYTHONUNBUFFERED 1
COPY requirements.txt /tmp/requirements.txt
# add ",sharing=locked" if release should block until builder is complete
RUN --mount=type=cache,target=/root/.cache,sharing=locked,id=pip \
python -m pip install --upgrade pip uv just-bin
RUN --mount=type=cache,target=/root/.cache,sharing=locked,id=pip \
python -m uv pip install --system --requirement /tmp/requirements.txt
# ------------------------------------------------------------
# Dev/testing layer
# ------------------------------------------------------------
FROM builder AS release
COPY . /src/
WORKDIR /src/
CMD ["python", "-m", "manage", "runserver", "--skip-checks", "0.0.0.0:8000"]
# ------------------------------------------------------------
# TODO: Add Production notes
# ------------------------------------------------------------