Код: Выделить всё
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS installer-env
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["myfunction/myfunction.csproj", "myfunction/"]
COPY . .
RUN dotnet publish "./myfunction/myfunction.csproj" --output /home/site/wwwroot
# 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 mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated8.0
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
AzureFunctionsJobHost__Logging__Console__IsEnabled=true
COPY --from=installer-env ["/home/site/wwwroot", "/home/site/wwwroot"]
COPY ["myfunction/entrypoint.sh", "."]
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
Код: Выделить всё
#!/bin/sh
STARTUP_TASKS=/app/startup_tasks.sh
# Check if the startup tasks script exists and is executable
if [ -f "$STARTUP_TASKS" ]; then
echo "Running additional startup tasks"
"$STARTUP_TASKS"
else
echo "No additional startup tasks found, skipping"
fi
// How do I start the azure function here?
Кто-нибудь знает способ запустить функцию Azure после использования другая точка входа?
Подробнее здесь: https://stackoverflow.com/questions/792 ... ntry-point
Мобильная версия