Running Azure Functions in a Docker Container

By | May 15, 2020

Azure Functions let us execute our code in a serverless environment. This does not require to create a solution or publish it as Azure Apps. In short, just focus on code and your functional aspect, and don’t need to worry about infrastructure. 

You can create Azure Function directly from the Azure Portal. Azure Functions Tools for Visual Studio also lets you develop, test, and deploy functions to Azure.

Azure Function Tips and Tricks

You can run your function code in an App Service, where we define the Runtime Stack, Version, and Region, or on the other hand, we can publish it in a Docker Container.

Once your Azure function is created, you need to provide your Azure Registry and Image Information to your Azure Function Services.

Related Post: Create Azure Functions using Visual Studio and deploy it to Azure

From the Azure Portal, go to your Function App – settings and Select Container settings. Here you can choose to following types of image sources.

  • Azure Container Registry
  • Docker Hub
  • Private Registry

If you have an Image created for any of the Image Source, provide the container name and name of the images and Save it.

With that you can easily get started with Azure Function, running on Docker. There are several ways to create the Docker Images for Azure Function, and using Azure DevOps for Automated releases and deployments. We will take a look at them in a detailed post.

Author: Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.

Leave a Reply