-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (36 loc) · 980 Bytes
/
Dockerfile
File metadata and controls
46 lines (36 loc) · 980 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
35
36
37
38
39
40
41
42
43
44
45
46
FROM python:3.14-slim
WORKDIR /app/
RUN apt-get update && apt-get install -y \
curl \
bash \
gcc \
build-essential \
gettext \
gnupg \
git \
musl-dev \
sqlite3 \
&& rm -rf /var/lib/apt/lists/*
# Install uv
# Ref: https://docs.astral.sh/uv/guides/integration/docker/#installing-uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
# Compile bytecode
# Ref: https://docs.astral.sh/uv/guides/integration/docker/#compiling-bytecode
ENV UV_COMPILE_BYTECODE=1
RUN uv venv .venv
ENV VIRTUAL_ENV=/app/.venv
ENV PATH="/app/.venv/bin:$PATH"
ENV PYTHONPATH=/app/
ENV PYTHONUNBUFFERED=1
# uv Cache
# Ref: https://docs.astral.sh/uv/guides/integration/docker/#caching
ENV UV_LINK_MODE=copy
# Copy dependency files
COPY ./uv.lock ./pyproject.toml ./
RUN uv sync --frozen --no-install-project --all-groups --extra all
COPY ./src/ ./src/
COPY ./tests/ ./tests/
COPY README.md ./
COPY LICENSE ./
COPY CONTRIBUTING.md ./
COPY .env.example .env