Add Docker as the primary way to build and run gausse

Dockerfile (non-root user, UID 1000 to match typical host users so bind
mounts don't end up root-owned) + docker-compose.yml with a ./results
volume for the SQLite database and reports that Stage 5/6 will write.
Verified by actually building the image and running the full test suite
and CLI inside the container, not just writing the files and assuming
they work.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
jze9
2026-07-06 20:17:12 +05:00
parent f22fd89612
commit acf846ab29
7 changed files with 60 additions and 6 deletions

18
Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM python:3.12-slim
WORKDIR /app
COPY pyproject.toml README.md ./
COPY src ./src
COPY tests ./tests
RUN pip install --no-cache-dir -e ".[dev]"
# Не root: иначе всё, что контейнер пишет в примонтированный ./results
# (SQLite-база, отчёты), становится на хосте файлами root:root.
RUN useradd --create-home --uid 1000 gausse
RUN mkdir -p /app/results && chown -R gausse:gausse /app
USER gausse
ENTRYPOINT ["gausse"]
CMD ["--help"]