Azure / Azure/Azure-Functions

Azure Functions isolated .net 8 serving content URL for Time Triggered and Service Bus triggered functions(Working fine with .Net6)

Open
#2,528 5 comments 0 reactions 1 assignee Claimed by @bhagyshricompany View on GitHub
Needs: Author feedback
Dominant language
PowerShell
Stars
1.1k
Forks
215
Avg merge
4h 2m
Merged PRs (30d)
1

Description

We have service bus triggered functions and Time triggered functions which we have moved to Azure Kubernetes workloads was working fine with .Net6

After moving to .Net 8 isolated worker function we are seeing below logs on container ->

**Hosting environment: Production
Content root path: /azure-functions-host
Now listening on: http://[::]:5000
Application started. Press Ctrl+C to shut down.**

As part of moving to .net8 we have made below updates

csProj Changes
```


net8.0
v4
Exe
enabled
enable
false
false













```

Docker File -

```

FROM mcr.microsoft.com/dotnet/sdk:8.0-preview AS installer-env

ARG BUILD_CONFIGURATION=Release
ARG user=appuser
ARG group=appuser
ARG uid=1000
ARG gid=1000
RUN addgroup --gid 1000 myusergroup && adduser --uid 1000 --ingroup myusergroup myuser
WORKDIR /src
COPY ["nuget.config", "."]
COPY ["src/Functions/Function.csproj", "src/Functions/FunctionName/"]
ARG FEED_URL
ARG PAT
ENV COMPlus_EnableDiagnostics=0
# download and install latest credential provider.
RUN wget -qO- https://aka.ms/install-artifacts-credprovider.sh | bash

# Optional: Sometimes the http client hangs because of a .NEt issue. Setting this in dockerfile helps
ENV DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0

RUN dotnet restore "./src/Functions/Function.csproj" -s ${FEED_URL} -s https://api.nuget.org/v3/index.json --configfile "nuget.config"
COPY . .
WORKDIR "/src//Functions/Function"
RUN dotnet build "./Function.csproj" -c $BUILD_CONFIGURATION -o /app/build

FROM installer-env AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./Function.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false

FROM mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated8.0 AS base
WORKDIR /home/site/wwwroot
COPY --from=publish /app/publish .

# To enable ssh & remote debugging on app service change the base image to the one below
# FROM mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated8.0-appservice
FROM base
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
AzureFunctionsJobHost__Logging__Console__IsEnabled=true

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.