我已经成功地在Docker中使用KestrelWeb服务器和 microsoft/dotnet 图像和标签 2.1-软件开发工具包 和 dotnet:2.1-aspnetcore-runtime 在多阶段构建中分别用于构建和运行时,例如
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base FROM microsoft/dotnet:2.1-sdk AS build
希望这有帮助。