ContainerApp vs. FunctionApp

Søren M. Olesen 6 Reputation points
2024-01-12T13:31:56.7966667+00:00

I've been running a Docker image with an Azure Function (.NET Isolated), in Azure Container Apps for some time now. When I created it I used:

az containerapp create ...

but now I came acros this post:
https://dev.to/lakkimartin/running-azure-functions-on-azure-container-apps-2jlg

where they seem to be using:

az functionapp create ...

What's the big difference between 'containerapp' and 'functionapp' will I gain anything by Re-Creating my container?

TIA

/Søren

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,909 questions
Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
686 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Chakaravarthi Rangarajan Bhargavi 1,115 Reputation points MVP
    2024-01-15T06:24:48.05+00:00

    Hi Søren M. Olesen

    Thank you for the interesting question!

    I would like to clarify you few details here:

    The difference between az containerapp and az functionapp in the context of running Azure Functions on Azure Container Apps lies in the approach taken to deploy and host the Azure Functions.

    1. az containerapp create ... (Azure Container Apps): This command is associated with Azure Container Apps, which is a fully managed serverless container service. With Azure Container Apps, you can deploy and run containerized applications without managing the underlying infrastructure. It provides a platform to run your containers at scale, offering auto-scaling, simplified networking, and integrated monitoring.

    https://learn.microsoft.com/en-us/cli/azure/containerapp?view=azure-cli-latest

    If you would like to deploy the same, The az containerapp up (or up) command is the fastest way to deploy an app in Azure Container Apps from an existing image, local source code or a GitHub repo. With this single command, you can have your container app up and running in minutes.

    https://learn.microsoft.com/en-us/azure/container-apps/containerapp-up

    az functionapp create ... (Azure Functions): This command is related to Azure Functions, a serverless compute service that enables you to run event-triggered code without explicitly provisioning or managing infrastructure. Azure Functions natively supports multiple programming languages and can be used for various scenarios, from simple scripts to complex workflows.

    https://learn.microsoft.com/en-us/cli/azure/functionapp?view=azure-cli-latest

    If you would like to deploy the same, consider like deploying your functions inside a container, you'd likely be looking at the Premium Plan, which supports running functions in custom containers.

    https://learn.microsoft.com/en-us/cli/azure/functionapp/deployment?view=azure-cli-latest

    The key difference is that when you use az containerapp, you are leveraging Azure Container Apps to run containerized applications, which could include Azure Functions deployed within containers. On the other hand, az functionapp is specifically for creating and managing Azure Functions, and it might not directly involve containers unless you are using the Azure Functions Premium Plan, which supports running functions within containers.

    Module for the whole Az Functionapp is here : https://learn.microsoft.com/en-gb/training/modules/create-serverless-logic-with-azure-functions/1-introduction

    In the context of the post you mentioned, it seems that the author is demonstrating how to run Azure Functions within containers using Azure Container Apps. The az functionapp create ... command mentioned in the post may be part of the process to create an Azure Function (potentially a function app in a Premium Plan), which is then containerized and deployed to Azure Container Apps.

    If you've been successfully running your Azure Functions in Azure Container Apps using az containerapp create, and if there are no specific requirements or issues you are facing, you may not necessarily need to switch to using az functionapp create. It's crucial to consider your specific use case, requirements, and any features or configurations you might need that are specific to one approach or the other.

    Hope this answer helps you with solution! Please comment below if you need any assistance on the same. Happy to help!

    Regards, Chakravarthi Rangarajan Bhargavi -Please kindly accept the answer and vote 'Yes' if you feel helpful to support the community, thanks a lot.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.