-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (24 loc) · 867 Bytes
/
Copy pathDockerfile
File metadata and controls
39 lines (24 loc) · 867 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
34
35
36
37
38
39
FROM python:3.13-slim AS builder
WORKDIR /app
RUN pip install --no-cache-dir uv
COPY pyproject.toml README.md ./
RUN uv sync --all-extras --no-dev
COPY bugfinder/ bugfinder/
RUN uv build && uv pip install dist/*.whl
FROM python:3.13-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN groupadd -r bugfinder && useradd -r -g bugfinder -d /app -s /sbin/nologin bugfinder
WORKDIR /app
COPY --from=builder /app/.venv /app/.venv
ENV PATH="/app/.venv/bin:$PATH"
ENV BF_DATABASE_URL="sqlite+aiosqlite:////data/bugfinder.db"
ENV PYTHONUNBUFFERED=1
RUN mkdir -p /data && chown -R bugfinder:bugfinder /data /app
VOLUME ["/data"]
USER bugfinder
ENTRYPOINT ["bf"]
CMD ["--help"]
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD bf --version || exit 1