# Test-only image — the app's Python deps + pytest/ruff, and NOTHING else. Code is bind-mounted at # run time (not baked), so pytest always sees the working tree, and this file never touches the prod # Dockerfile, so the published image can never carry test tooling. Same python + same pinned # requirements.txt as the runtime stage, so tests run against the prod dependency set. Rebuilt only # when a requirements file changes (the pip layer is cache-keyed on them); otherwise a no-op. # # docker build -f backend/Dockerfile.test -t siftlode-test:local backend # docker run --rm -v "/backend:/app" -w /app siftlode-test:local python -m pytest FROM python:3.12-slim WORKDIR /app COPY requirements.txt requirements-dev.txt ./ RUN pip install --no-cache-dir -r requirements.txt -r requirements-dev.txt