bittorrent-benchmarks.Dockerfile
1 FROM python:3.12-slim 2 3 ARG BUILD_TYPE="test" 4 5 RUN pip install poetry 6 7 RUN mkdir /opt/bittorrent-benchmarks 8 WORKDIR /opt/bittorrent-benchmarks 9 10 COPY pyproject.toml poetry.lock ./ 11 RUN if [ "$BUILD_TYPE" = "release" ]; then \ 12 echo "Image is a release build"; \ 13 poetry install --without dev --no-root; \ 14 else \ 15 echo "Image is a test build"; \ 16 poetry install --no-root; \ 17 fi 18 19 COPY . . 20 RUN poetry install --only main 21 22 ENTRYPOINT ["poetry", "run", "bittorrent-benchmarks", "experiments"]