-
Notifications
You must be signed in to change notification settings - Fork 0
/
rexmit.Dockerfile
32 lines (27 loc) · 1.16 KB
/
rexmit.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
RUN apt update && \
apt install -y curl libsodium-dev libopus-dev ffmpeg && \
rm -rf /var/lib/apt/lists/*
RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
RUN chmod a+rx /usr/local/bin/yt-dlp
WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS rexmit-build-base
WORKDIR /build
COPY rexmit.sln rexmit.sln
COPY src/ src/
RUN --mount=type=cache,target=/root/.nuget/packages \
dotnet restore ./rexmit.sln
FROM rexmit-build-base AS rexmit-build
RUN --mount=type=cache,target=/root/.nuget/packages \
dotnet build -c Release --no-restore ./rexmit.sln
FROM rexmit-build AS rexmit-test
RUN dotnet test -c Release --no-build --no-restore ./rexmit.sln
FROM rexmit-build AS publish-rexmit
RUN --mount=type=cache,target=/root/.nuget/packages \
dotnet publish -c Release --no-build --no-restore -o /app ./src/rexmit/rexmit.csproj
FROM base AS final-rexmit
COPY src/rexmit/okbabybyebye.mp3 ./okbabybyebye.mp3
COPY src/rexmit/okaaay.mp3 ./okaaay.mp3
COPY src/rexmit/sigh.mp3 ./sigh.mp3
COPY --from=publish-rexmit /app .
ENTRYPOINT ["dotnet", "rexmit.dll", "--urls", "http://[::]:5000"]