Runtime | Version & status |
---|---|
dotnet | 3.1 OK |
python | --coming soon-- |
node | --coming soon-- |
powershell | --coming soon-- |
This repo contains Docker image with enhanced host runtime, based on Microsoft's Azure Functions host.
Microsoft's Azure Functions host image is dependent on Azure - to run functions on your own server, you need to have Azure Storage instance and have server connected to Azure.
Main goal of this image is to run Azure Functions without any internet connection on any Docker server you have.
For now, it's not possible to run Azure Functions completely without connection to Azure (Azure Storage) - even with this image.
It's because of runtime host needs to have somewhere metadata about functions (locks, timers) - and Microsoft's host uses Azure Storage internally.
I have idea how to remove this dependency too, but it's a lot of work - will be removed in future.
(dotnet) As first you have compile your application by microsoft/dotnet
image.
For runtime use vjirovsky/vaseks-af-host:{runtimelanguage}-{version}
FROM mcr.microsoft.com/dotnet/sdk:3.1 AS installer-env
COPY src/ /src/
RUN cd /src/SampleFunctionApp && \
mkdir -p /home/site/wwwroot && \
dotnet publish *.csproj -c "Release" --output /home/site/wwwroot
FROM vjirovsky/vaseks-af-host:dotnet-3.1
ENV AzureWebJobsStorage="---YOUR-STORAGE_CONNECTION_STRING---"
COPY --from=installer-env ["/home/site/wwwroot", "/home/site/wwwroot"]
From Dockerfile you are able to pass on some parameters to your Function application by ENV command (see AzureWebJobsStorage parameter).
You can find out sample project here.