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>
19 lines
513 B
Docker
19 lines
513 B
Docker
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"]
|