forked from ErisApps/POI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (26 loc) · 1.63 KB
/
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
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base
RUN echo "deb http://deb.debian.org/debian bookworm contrib non-free" > /etc/apt/sources.list.d/contrib.list
RUN apt-get update; apt-get install -y ttf-mscorefonts-installer fontconfig
WORKDIR /app
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["source/POI.DiscordDotNet/POI.DiscordDotNet.csproj", "source/POI.DiscordDotNet/"]
COPY ["source/POI.Persistence.EFCore.Npgsql/POI.Persistence.EFCore.Npgsql.csproj", "source/POI.Persistence.EFCore.Npgsql/"]
COPY ["source/POI.Persistence/POI.Persistence.csproj", "source/POI.Persistence/"]
COPY ["source/POI.Persistence.Domain/POI.Persistence.Domain.csproj", "source/POI.Persistence.Domain/"]
COPY ["source/POI.ThirdParty.BeatSaver/POI.ThirdParty.BeatSaver.csproj", "source/POI.ThirdParty.BeatSaver/"]
COPY ["source/POI.ThirdParty.Core/POI.ThirdParty.Core.csproj", "source/POI.ThirdParty.Core/"]
COPY ["source/POI.ThirdParty.BeatSavior/POI.ThirdParty.BeatSavior.csproj", "source/POI.ThirdParty.BeatSavior/"]
COPY ["source/POI.ThirdParty.ScoreSaber/POI.ThirdParty.ScoreSaber.csproj", "source/POI.ThirdParty.ScoreSaber/"]
RUN dotnet restore "source/POI.DiscordDotNet/POI.DiscordDotNet.csproj"
COPY . .
WORKDIR "/src/source/POI.DiscordDotNet"
RUN dotnet build "POI.DiscordDotNet.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "POI.DiscordDotNet.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "POI.DiscordDotNet.dll"]