# Get Base Image (Full .NET Core SDK) FROM mcr.microsoft.com/dotnet/sdk AS build-env WORKDIR /app # Copy csproj and restore COPY *.csproj ./ RUN dotnet restore # Copy everything else and build COPY . ./ RUN dotnet publish -c Release -o out # Generate runtime image FROM mcr.microsoft.com/dotnet/aspnet COPY --from=build-env /app/out/ . ENTRYPOINT ["dotnet", "MyAPI.dll"]
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)