Open richardjharding opened 5 years ago
Ok so this looks like an issue trying to bind to a port less than 1024 and is expected
The only way I could see to specify an alternative port for the host to listen on was to set the following env var
ENV ASPNETCORE_URLS='http://+:5000'
Is there an alternative settings file that would also work?
I tried the same thing, I was able to get a little further. I added this: RUN apk add --no-cache libcap
and
RUN setcap 'cap_net_bind_service=+ep' /azure-functions-host/Microsoft.Azure.WebJobs.Script.WebHost
Unfortunately, now I get "Unhandled Exception: System.InvalidOperationException: Host.DestinationHostUrl must be specified either as an environment variable or as a command-line switch." I'm not quite sure why.
I'm using the Alpine dotnet images and our vulnerability checking tool (Twistlock) is picking up a few out of date packages which I think I can fix but one issue is its suggesting that the image should be created with a non root user Is any work underway to support this? I'm able to get an asp.net core app on say
mcr.microsoft.com/dotnet/core/runtime-deps:2.2.4-alpine3.9
to run as non root but when I try with the functions runtime I get a number of permission errors such asthis is after setting permissions for the new user on the following
any ideas what I'm missing?