cs-codex-dist-tests/Tools/BittorrentDriver/Dockerfile

34 lines
811 B
Docker
Raw Permalink Normal View History

2024-09-17 14:03:58 +00:00
# Variables
ARG IMAGE=ubuntu:24.10
ARG APP_HOME=/app
2024-09-17 08:46:38 +00:00
2024-09-17 14:03:58 +00:00
# Build
FROM ${IMAGE} AS builder
ARG APP_HOME
RUN apt-get update
RUN apt-get install dotnet-sdk-8.0 -y
2024-09-17 08:46:38 +00:00
2024-09-17 14:03:58 +00:00
WORKDIR ${APP_HOME}
COPY ./Tools/BittorrentDriver ./Tools/BittorrentDriver
COPY ./Framework ./Framework
RUN dotnet restore Tools/BittorrentDriver
RUN dotnet publish Tools/BittorrentDriver -c Release -o out
2024-09-17 08:46:38 +00:00
2024-09-17 14:03:58 +00:00
# Create
FROM ${IMAGE}
2024-09-17 08:46:38 +00:00
ARG DEBIAN_FRONTEND=noninteractive
2024-09-17 14:03:58 +00:00
ARG APP_HOME
ENV APP_HOME=${APP_HOME}
2024-09-17 08:46:38 +00:00
# Set up npm and bittorrent-tracker
RUN apt-get update
2024-09-17 14:03:58 +00:00
RUN apt-get install npm aspnetcore-runtime-8.0 -y
2024-09-17 08:46:38 +00:00
RUN npm install -g bittorrent-tracker
# Set up transmission
RUN apt-get install transmission-cli transmission-common transmission-daemon -y
2024-09-17 14:03:58 +00:00
WORKDIR ${APP_HOME}
COPY --from=builder ${APP_HOME}/out .
CMD dotnet ${APP_HOME}/BittorrentDriver.dll