-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (24 loc) · 837 Bytes
/
Dockerfile
File metadata and controls
33 lines (24 loc) · 837 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
FROM python:3.13-slim AS builder
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
openjdk-21-jre-headless \
curl && \
rm -rf /var/lib/apt/lists/*
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
WORKDIR /src
COPY . .
# 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/*
# 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"]