/ Dockerfile
Dockerfile
1 #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. 2 3 FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base 4 WORKDIR /app 5 EXPOSE 80 6 7 FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build 8 WORKDIR /src 9 COPY ["GrpcService1/GrpcService1.csproj", "GrpcService1/"] 10 RUN dotnet restore "GrpcService1/GrpcService1.csproj" 11 COPY . . 12 WORKDIR "/src/GrpcService1" 13 RUN dotnet build "GrpcService1.csproj" -c Release -o /app/build 14 15 FROM build AS publish 16 RUN dotnet publish "GrpcService1.csproj" -c Release -o /app/publish 17 18 FROM base AS final 19 WORKDIR /app 20 COPY --from=publish /app/publish . 21 ENTRYPOINT ["dotnet", "GrpcService1.dll"]