FROM python:3.12-slim

# Install system deps for theHarvester and general OSINT CLI tools
RUN apt-get update && apt-get install -y --no-install-recommends \
    curl \
    dnsutils \
    git \
    whois \
    ca-certificates \
    && rm -rf /var/lib/apt/lists/*

# Install theHarvester - well-known OSINT tool (PyPI package: theHarvester)
# Pinned to the access-date-current release 4.10.1 cited in the chapter.
# Later releases (4.11.0, 4.11.1) are also compatible; update the pin as needed.
RUN pip install --no-cache-dir theHarvester==4.10.1

WORKDIR /workspace

# Container stays alive so students can exec into it interactively
CMD ["bash", "-c", "echo 'OSINT tools container ready. Use: docker compose exec osint-tools bash' && tail -f /dev/null"]
