DotNet Runtime Docker-Image 表示需要 SDK

DotNet Runtime Docker-Image 表示需要 SDK

我正在尝试运行从以下 Dockerfile 创建的 Docker 容器:

FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim-arm32v7 AS runner
WORKDIR /app

COPY MyApp/bin/Debug/netcoreapp3.1 ./
COPY SomeFolder SomeOtherFolder

ENTRYPOINT ["dotnet", "MyApp.dll"]

但是,我收到以下错误消息:

It was not possible to find any installed .Net Core SDKs. Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from: https://aka.ms/dotnet-download

当我在容器内打开控制台时,我可以dotnet MyApp.dll毫无问题地执行,并且图像的早期版本也可以正常工作。替换ENTRYPOINTCMD无济于事。

相关内容