# Shared image for victim / firsthop / collector. The aiohttp version is
# pinned via build arg: the victim builds with the VULNERABLE 3.13.5; the
# firsthop and collector are plain HTTP servers and may use any version.
FROM python:3.12-slim-bookworm

ARG AIOHTTP_VERSION
RUN test -n "$AIOHTTP_VERSION"
RUN pip install --no-cache-dir "aiohttp==${AIOHTTP_VERSION}"

WORKDIR /app
COPY config/victim_app.py /app/victim_app.py
COPY config/firsthop_app.py /app/firsthop_app.py
COPY config/collector_app.py /app/collector_app.py
COPY config/victim_entrypoint.sh /app/victim_entrypoint.sh
RUN chmod +x /app/victim_entrypoint.sh
