FROM registry.fedoraproject.org/fedora:44

LABEL org.opencontainers.image.title="Tongs Fedora 44 validation harness"
LABEL org.opencontainers.image.description="Disposable headless test environment for issue 27"

COPY installer-verifier.lock /opt/tongs-harness/installer-verifier.lock

RUN dnf install --assumeyes --setopt=install_weak_deps=False \
        git-core \
        python3 \
        python3-pip \
    && dnf clean all \
    && python3 -m venv /opt/tongs-harness \
    && /opt/tongs-harness/bin/python -m pip install --no-cache-dir \
        aiosqlite\>=0.20 \
        build\>=1.2 \
        hatch-vcs \
        hatchling \
        httpx\>=0.27 \
        'mcp[cli]==1.29.1' \
        platformdirs\>=4.0 \
        pyperclip\>=1.8 \
        pytest\>=8.0 \
        pytest-asyncio\>=0.24 \
        pyyaml\>=6.0 \
        setuptools\>=68 \
        textual==4.0.0 \
        wheel \
        -r /opt/tongs-harness/installer-verifier.lock

COPY probe.py /opt/tongs-harness/probe.py

ENV PATH="/opt/tongs-harness/bin:${PATH}"
ENTRYPOINT ["python", "/opt/tongs-harness/probe.py"]
