FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /source COPY WebApi.csproj . RUN dotnet restore WebApi.csproj COPY . . RUN dotnet publish -c release -o /app FROM mcr.microsoft.com/dotnet/aspnet:8.0 WORKDIR /app COPY --from=build /app . ENTRYPOINT ["dotnet", "WebApi.dll"]