I've an asp.net core app that I want to run as windows container inside Azure app service. The app uses PowerShell 5.1 and I'm not using mcr.microsoft.com/dotnet/aspnet:6.0, but building it as self contained. Snippets of the docker file are:
FROM mcr.microsoft.com/windows/servercore:ltsc2019 AS base
....
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
.. -c Release -o /app/publish --self-contained --runtime win-x64
...
and then
FROM base AS final
ENTRYPOINT ["App.exe"]
The docker file is used to correctly build and push to ACR from azure devops pipeline, but when running the image in App Service it says: Unable to start container. Error message: Index was outside the bounds of the array
I've also tried couple of other base images: FROM mcr.microsoft.com/dotnet/aspnet:6.0-windowsservercore-ltsc2019 AS base and FROM mcr.microsoft.com/dotnet/runtime:5.0-windowsservercore-ltsc2019 AS base and they give same error. I suspect it's because the image is not supported in app service. Running locally on Windows 10 laptop is fine. Does anyone know what windows images does app service support?