
我正在嘗試運行從以下 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
毫無問題地執行,並且早期版本的映像也可以工作。替換ENTRYPOINT
為CMD
也沒有幫助。