# syntax=docker/dockerfile:1.7
# License client used by install.sh. rfq-license-client needs Python 3.12,
# which most distributions do not ship, so it runs here instead of on the host.
FROM python:3.12-slim

COPY requirements.txt /tmp/requirements.txt
COPY rfq_license_client-*.whl /tmp/
RUN --mount=type=cache,target=/root/.cache/pip,sharing=locked \
    pip install -r /tmp/requirements.txt \
    && pip install --no-deps /tmp/rfq_license_client-*.whl \
    && rm -f /tmp/rfq_license_client-*.whl /tmp/requirements.txt

COPY installer_helper.py /opt/rfq-installer/installer_helper.py

ENTRYPOINT ["rfq-license-client"]
