我正在在“用于Linux的Azure应用程序服务”容器上部署/发布示例Asp .Net Core应用程序,它在以下步骤进入无限循环:
**Step 5/17 : FROM microsoft/dotnet:2.1-sdk AS build
2.1-sdk: Pulling from microsoft/dotnet**
该应用程序在Linux容器中本地运行良好。
我的笔记本电脑上有适用于Windows 10 Professional的Docker CE。
以下是我的dockerfile:
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
WORKDIR /app
EXPOSE 80
FROM microsoft/dotnet:2.1-sdk AS build
WORKDIR /src
COPY ["WebAPI/WebAPI.csproj", "WebAPI/"]
RUN dotnet restore "WebAPI/WebAPI.csproj"
COPY . .
WORKDIR "/src/WebAPI"
RUN dotnet build "WebAPI.csproj" -c Release -o /app
FROM build AS publish
RUN dotnet publish "WebAPI.csproj" -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "WebAPI.dll"]