-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
34 lines (25 loc) · 936 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
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim@sha256:abee452509bff525494b21aea05708bfa026802b12741213594be2be13741a97
# allow all users to get into "home", like git checking for a global ignore
# file, until better user juggling in the future
RUN chmod -R 777 /root
RUN apt-get update \
&& apt-get install --no-install-recommends --yes \
git
RUN git config --global --add safe.directory "*"
ENV UV_COMPILE_BYTECODE=1 \
UV_LINK_MODE=copy \
UV_SYSTEM_PYTHON=true
WORKDIR /app
RUN touch README.md
COPY pyproject.toml uv.lock /app/
# install the project's dependencies
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-install-project --no-dev
# then the project itself
COPY nava /app/nava
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-dev
ENV PATH="/app/.venv/bin:$PATH"
COPY bin/docker-entry /usr/local/bin
WORKDIR /project-dir
ENTRYPOINT ["docker-entry"]