I saw maybe because the of this
RUN dotnet publish -c Release -o out
Should change to the
RUN dotnet publish -c Release -o /app
And the entry point just change to
COPY --from=build-env /app .
ENTRYPOINT ["dotnet", "/app/MyAPI.dll"]
The reason is the output folder /out
but you entry point in the root folder so that's throw the exception.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…