FROM python:3.12-slim-bookworm

RUN --mount=from=ghcr.io/astral-sh/uv:latest,source=/uv,target=/bin/uv \
    --mount=type=bind,source=uv.lock,target=uv.lock \
    --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
    uv export --all-extras --frozen --no-emit-workspace --no-editable -o requirements.txt && \
    uv pip install -r requirements.txt --system

COPY lint-and-test.sh pyproject.toml ./

COPY fansifter_common/ ./fansifter_common
COPY tests/ ./tests

ENTRYPOINT [ "/var/task/lint-and-test.sh" ]
