Container does not start, immediately exited with code 150

2022-12-08 21:11:35 You must install or update .NET to run this application.
2022-12-08 21:11:35
2022-12-08 21:11:35 App: /App/DotNet.Docker.dll
2022-12-08 21:11:35 Architecture: x64
2022-12-08 21:11:35 Framework: ‘Microsoft.NETCore.App’, version ‘5.0.0’ (x64)
2022-12-08 21:11:35 .NET location: /usr/share/dotnet/
2022-12-08 21:11:35
2022-12-08 21:11:35 The following frameworks were found:
2022-12-08 21:11:35 6.0.11 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
2022-12-08 21:11:35
2022-12-08 21:11:35 Learn about framework resolution:
2022-12-08 21:11:35 Troubleshoot app launch failures | Microsoft Learn
2022-12-08 21:11:35
2022-12-08 21:11:35 To install missing framework, download:
2022-12-08 21:11:35 Download .NET 5.0 Runtime (v5.0.17) - macOS x64 Installer

Hello , my container cannot be started with the previous output, what I need to do now ? thanks for your help. Regards.

help for this ? thanks

I have no idea about .NET development, but doesn’t the log output already indicate the problem?
Seems like the image you use provides a different .NET core version than your application needs.

Your app seem to require .NET core 5.0.x, while your image seem to have .NET core 6.0.11.

Also, this is not a Docker Desktop for Windows related issue.

Hello meyay, thanks for your answer and remark. Best regard.

I changed the Version (6.0 to 5.0) inside the Dockerfile and everything is ok now :wink: