FROM ubuntu:24.04

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y --no-install-recommends \
    aria2 \
    build-essential \
    ca-certificates \
    cmake \
    deluge-console \
    deluged \
    procps \
    python3 \
    python3-libtorrent \
    qbittorrent-nox \
    rtorrent \
    transmission-cli \
    transmission-daemon \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /work

COPY CMakeLists.txt /work/CMakeLists.txt
COPY include /work/include
COPY src /work/src
COPY harness /work/harness
COPY interop /work/interop

RUN cmake -S /work -B /work/build -DCMAKE_BUILD_TYPE=Release -DPEER_NATIVE=OFF \
    && cmake --build /work/build

ENV PYTHONPATH=/work/harness:/work/interop
