How to Deploy Azure Function App via Azure CLI?

2.1k views Asked by At

I have an Azure Function App Written in C# and I am trying to build them using the "docker build" command on my local machine. The build is getting completed successfully. Now I have a Docker Image on my local machine which I would like to try Deploying to Azure for testing purposes. Can this be done?

I have attempted to do it via Azure CLI, but I am not sure of ways to point to my Local Docker Image. What is the recommended way?

az functionapp deployment container config --enable-cd true --name function-app-name --resource-group resource_group_name
2

There are 2 answers

0
Delliganesh Sevanesan On

AFAIK, This Feature is not available right now.

The MS Doc says that .zip file deployment uses the same Kudu service that powers continuous integration-based deployments, it includes the Syncing function triggers in a Consumption plan function app..

If you are using a Linux Container it requires the Premium plan or a Dedicated (App Service) plan. The Azure function with Windows Container is not supported. Refer here.

You can refer MS Doc to create Azure function in the container.

0
Turbot On

Hi you need to push your custom docker image into Azure Container Registry, and then configure the Azure App Service to deploy the image from registry.

and Yes - you can't deploy to Azure function Apps (FaaS) since custom image is considered platform as service (PaaS)

Build and run a custom container in Azure