continuity/Server/Dockerfile

19 lines
507 B
Text
Raw Normal View History

2023-08-09 14:23:41 +00:00
FROM mcr.microsoft.com/dotnet/runtime:7.0 AS base
WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src
COPY ["Server/Server.csproj", "Server/"]
RUN dotnet restore "Server/Server.csproj"
2023-08-09 14:23:41 +00:00
COPY . .
WORKDIR "/src/Serer"
RUN dotnet build "Server.csproj" -c Release -o /app/build
2023-08-09 14:23:41 +00:00
FROM build AS publish
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 .
ENTRYPOINT ["dotnet", "Server.dll"]