-
-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (21 loc) · 614 Bytes
/
Copy pathDockerfile
File metadata and controls
30 lines (21 loc) · 614 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
FROM python:3.14-slim
# required for psycopg2
RUN apt update \
&& apt install -y --no-install-recommends \
build-essential \
libpq-dev \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
RUN useradd --no-create-home --gid root runner
ENV UV_PROJECT_ENVIRONMENT=/code/.venv \
UV_NO_MANAGED_PYTHON=1 \
UV_NO_CACHE=true \
UV_LINK_MODE=copy
WORKDIR /code
COPY pyproject.toml .
COPY uv.lock .
RUN uv sync --all-extras --frozen --no-install-project
COPY . .
RUN chown -R runner:root /code && chmod -R g=u /code
USER runner