-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathContainerfile
More file actions
45 lines (38 loc) · 1.14 KB
/
Containerfile
File metadata and controls
45 lines (38 loc) · 1.14 KB
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
FROM ghcr.io/astral-sh/uv:python3.14-bookworm-slim AS builder
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy UV_PYTHON_DOWNLOADS=0
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
gcc \
g++ \
libdbus-1-dev \
libglib2.0-dev \
pkg-config \
swig \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY pyproject.toml uv.lock ./
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --locked --no-install-project --no-dev
COPY . /app
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --locked --no-dev
# Test target — includes dev dependencies (ruff, ty, pytest)
FROM builder AS test
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --locked
ENV PATH="/app/.venv/bin:$PATH"
# Production target
FROM fedora:latest
LABEL org.opencontainers.image.source=https://github.com/quickvm/psi
RUN dnf install -y \
python3.14 \
dbus-libs \
glib2 \
jq \
opensc \
pcsc-lite-libs \
&& dnf clean all
COPY --from=builder /app /app
RUN ln -sf /usr/bin/python3.14 /usr/local/bin/python3
ENV PATH="/app/.venv/bin:$PATH"
ENTRYPOINT ["psi"]