# UDE OrgMiner staff verification using the collaboration graph.
# Build from the repository root:
# docker build -f service/scripts/jobs-image/orgminer-verified-persons-ude/Dockerfile \
#   -t docker.nes.uni-due.de/inse/jobs/orgminer-verified-persons-ude:latest .
#
# The runner injects INSE credentials for registry images and NES credentials
# only for this image. The persistent /state volume holds the JSON checkpoint.
FROM python:3.13-slim

WORKDIR /app
ENV PYTHONUNBUFFERED=1 \
    PYTHONPATH=/app/service/src/main

COPY service/scripts/jobs-image/orgminer-verified-persons-ude/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY service/src/main/inse/ ./service/src/main/inse/
COPY service/src/data/hierarchies/I62318514/hierarchy.json \
    ./service/src/data/hierarchies/I62318514/hierarchy.json
COPY service/scripts/upload_orgminer_verified_persons_ude/ \
    ./service/scripts/upload_orgminer_verified_persons_ude/

# Fail the image build if the service verification code is missing a dependency.
RUN python -c "import inse.orgminer.logic"

ENTRYPOINT ["python", "/app/service/scripts/upload_orgminer_verified_persons_ude/upload_orgminer_verified_persons_ude.py", \
    "--progress-file", "/state/orgminer_verified_persons_ude_progress.json"]
