18 lines
499 B
Docker
18 lines
499 B
Docker
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 ["Serer/Serer.csproj", "Serer/"]
|
|
RUN dotnet restore "Serer/Serer.csproj"
|
|
COPY . .
|
|
WORKDIR "/src/Serer"
|
|
RUN dotnet build "Serer.csproj" -c Release -o /app/build
|
|
|
|
FROM build AS publish
|
|
RUN dotnet publish "Serer.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
|
|
|
FROM base AS final
|
|
WORKDIR /app
|
|
COPY --from=publish /app/publish .
|
|
ENTRYPOINT ["dotnet", "Serer.dll"]
|