-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (31 loc) · 797 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
33
34
35
36
37
38
39
40
41
42
43
# syntax=docker/dockerfile:1
ARG PORT=8000
ARG HOST=0.0.0.0
FROM python:3.12.4-slim-bookworm AS base-python
WORKDIR /app
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y \
curl \
make \
&& curl -LsSf https://astral.sh/uv/install.sh | sh \
&& apt-get remove -y curl && apt-get autoremove -y
COPY pyproject.toml .
COPY .env .
COPY Makefile .
# Ensure `uv` is in the PATH
ENV PATH="/root/.cargo/bin:${PATH}"
FROM base-python AS run-base
RUN make install
COPY indexes indexes
EXPOSE ${PORT}
FROM run-base AS run
ENTRYPOINT ["make", "run"]
FROM base-python AS base-dev
RUN make install-dev
COPY indexes indexes
COPY tests tests
FROM base-dev AS run-lint
ENTRYPOINT ["make", "run-lint"]
FROM base-dev AS tests-run
ENTRYPOINT ["make", "run-cov"]