2023-08-09 14:23:41 +00:00
|
|
|
FROM mcr.microsoft.com/dotnet/runtime:7.0 AS base
|
|
|
|
WORKDIR /app
|
|
|
|
|
2023-10-27 16:21:32 +00:00
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
2023-08-09 14:23:41 +00:00
|
|
|
WORKDIR /src
|
2023-08-09 20:04:10 +00:00
|
|
|
COPY ["Server/Server.csproj", "Server/"]
|
|
|
|
RUN dotnet restore "Server/Server.csproj"
|
2023-08-09 14:23:41 +00:00
|
|
|
COPY . .
|
2023-08-10 20:39:09 +00:00
|
|
|
WORKDIR "/src/Server"
|
2023-08-09 20:04:10 +00:00
|
|
|
RUN dotnet build "Server.csproj" -c Release -o /app/build
|
2023-08-09 14:23:41 +00:00
|
|
|
|
|
|
|
FROM build AS publish
|
2023-08-09 20:04:10 +00:00
|
|
|
RUN dotnet publish "Server.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
2023-08-09 14:23:41 +00:00
|
|
|
|
|
|
|
FROM base AS final
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=publish /app/publish .
|
2023-08-09 20:04:10 +00:00
|
|
|
ENTRYPOINT ["dotnet", "Server.dll"]
|