Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.13-slim
FROM python:3.13-slim AS builder

RUN apt-get update && \
apt-get install -y --no-install-recommends \
Expand All @@ -13,15 +13,21 @@ COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
WORKDIR /src
COPY . .

# Install dependencies and build the package using uv
# This works with normal Git repositories (non-worktree)
RUN uv sync --frozen --no-dev
# Build wheel for distribution (standard Python package)
RUN uv build --wheel --out-dir /wheels

FROM python:3.13-slim

# Install runtime dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends openjdk-21-jre-headless git && \
rm -rf /var/lib/apt/lists/*

RUN useradd -m smart-tests && chown -R smart-tests:smart-tests /src
# Install wheel system-wide to /usr/local/bin
RUN --mount=type=bind,from=builder,source=/wheels,target=/wheels \
pip install --no-cache-dir /wheels/*.whl

RUN useradd --system --no-create-home smart-tests
USER smart-tests

ENTRYPOINT ["smart-tests"]
Loading