Skip to content

Docker Azure Functions runtime host - optimized to run more independently of Azure

License

Notifications You must be signed in to change notification settings

vjirovsky/docker-vaseks-af-host

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Runtime Version & status
dotnet 3.1 OK
python --coming soon--
node --coming soon--
powershell --coming soon--

Vasek's Azure Functions runtime

This repo contains Docker image with enhanced host runtime, based on Microsoft's Azure Functions host.

Why to use this image

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.

Important notice

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.

How to use

(dotnet) As first you have compile your application by microsoft/dotnet image.

For runtime use vjirovsky/vaseks-af-host:{runtimelanguage}-{version}

Minimum Dockerfile (dotnet):

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).

Sample project

You can find out sample project here.

Result



About

Docker Azure Functions runtime host - optimized to run more independently of Azure

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages