nigelpoulton / ckad

Support files for Pluralsight CKAD course
111 stars 98 forks source link

health-probes dotnet app fails to start with framework version mismatch #41

Open a-abella opened 5 months ago

a-abella commented 5 months ago

For 3 Application Observability and Maintenance/3 Implementing Probes and Health Checks/health-probes/dockerfile:

You must install or update .NET to run this application.

App: /app/health-probes.dll
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '7.0.0' (x64)
.NET location: /usr/share/dotnet/

The following frameworks were found:
  8.0.6 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Learn more:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=7.0.0&arch=x64&rid=linux-x64&os=debian.12

Workaround: pin the following image versions in the dockerfile:

arunv84 commented 3 weeks ago

Also, I am using Docker and WSL. I got this error when deploying kubernetes: Syntax error: EOF in backquote substitution

This was due to backquotes at the last line in dockerfile: ENTRYPOINT ["dotnet", "health-probes.dll"]```

Removing ``` and recreating the oci image fixed the problem.