FROM python:3.14.0-slim

ENV DEBIAN_FRONTEND=noninteractive

RUN apt update \
  && apt install ca-certificates python3 python3-pip python3-venv python3-setuptools php8.4-cli php8.4-xml sslscan libgtk-3-0 xvfb curl bzip2 -y \
  --no-install-recommends --no-install-suggests \
  && apt clean -yq \
  && apt autoremove -yq \
  && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
  && truncate -s 0 /var/log/*log

RUN pip install --upgrade pip \
    && python3 -c "import sys; print(sys.version)" \
    && mkdir /usr/src/app

WORKDIR /usr/src/app

COPY . .

RUN pip install .[test] --no-cache-dir && playwright install firefox --with-deps
CMD ["pytest"]
