health-probes dotnet app fails to start with framework version mismatch
a-abella opened this issue · comments
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:
FROM mcr.microsoft.com/dotnet/aspnet AS base
->FROM mcr.microsoft.com/dotnet/aspnet:7.0.0 AS base
FROM mcr.microsoft.com/dotnet/sdk AS build
->FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build