In this article, Azure Cloud Shell (Azure CLI) is used to deploy containerized application to Azure Container Apps. Azure Container Apps service allows to run microservices and containerized applications on the serverless platform. Container Apps main benefit is to run the containers with ought concerns to manually configuring the cloud infrastructure and complex container coordinators. After this exercise one will be able to create container app environment, deploy a container, and verify running application in Azure.

Following tasks are performed:

Create Resource Group and Prepare Azure Environment

First step is to create resources in Azure and prepare the Azure environment using Azure CLI .Azure CLI is a free Bash shell which can be run directly within the Azure portal. It is preinstalled and configured within an account.

Create Resource Group

az group create \ 
     --name <resource-group> \ 
     --location <location>
az group create \ 
     --name myResourceGroup1 \ 
     --location eastus2 
az account list-locations
az account list-locations --query "[*].name"
az account list-locations --query "[*].name" --out tsv | sort

Prepare Azure Environment

Let’s upgrade latest version of Azure Container Apps extension for the installed CLI and then register required two namespaces one by one as following.

az extension add \
     --name containerapp 
     --upgrade
az provider register --namespace Microsoft.App
az provider register --namespace Microsoft.OperationalInsights

Create Container Apps Environment

In Azure Container Apps an environment is used to create secure boundary around group of container apps. az containerapp env create command is used to create an environment.

az containerapp env create \
    --name myContainerEnv1 \
    --resource-group myResourceGroup1 \
    --location eastus2 

Deploy Container App

Once an environment is created successfully next task is deploy container app. az containerapp create command is used to deploy a container image to Azure environment.

az containerapp create \
     --name my-container-app1 \
     --resource-group myResourceGroup1 \
     --environment myContainerEnv1 \
     --image mcr.microsoft.com/azuredocs/containerapps-helloworld:latest \
     --target-port 80 \
     --ingress 'external' \
     --query properties.configuration.ingress.fqdn

Here, --ingress 'external' setting is used to allow application accessible from public requests.

Output: Command execution will take few minutes to complete the operation process and will return fully qualified domain name for container application.

Verify Running Container App

Azure CLI

Once container app created successfully next task is to verify the container app is running properly or not using az containerapp show command as following. It shows the container’s build status.

az containerapp show \
     --name my-container-app1 \
     --resource-group myResourceGroup1 \
     --query "{FQDN:ipAddress.fqdn,ProvisioningState:provisioningState}" \
     --out table 

Output: It displays fully qualified domain name (FQDN) of the container along with it’s state.

FQDNProvisioningState
my-container-app1.eastus2.azurecontainer.ioSucceeded

Browser

One can access container's FQDN from a browser as below. This will be available only if ProvisioningState is Succeeded for the created container.

FQDN from a browser

Pull container app logs

az containerapp logs command is used to pull out container app logs. This is used during an application execution troubleshooting. The output displays the container app’s logs and it shows HTTP GET requests generated while viewed the application in browser.

az containerapp logs \
     --name my-container-app1 \
     --resource-group myResourceGroup1 

Output

listening on port 80
::ffff:10.242.254.51 - - [12/Nov/2025:11:10:35 +0000] "GET / HTTP/1.1" 304 - "-" ...
::ffff:10.242.254.51 - - [15/Nov/2025:12:30:10 +0000] "GET / HTTP/1.1" 304 - "-" ...
…

Clean up resources

Once finished the exercise it’s recommended to delete cloud resources are being created to avoid the unnecessary resource usage and any future costs. Deleting a resource group will delete all resources contained within it. Perform following steps one by one in to Azure Portal to clean up resources:

One can also clean up resources using Azure CLI as following:

Delete container app - az containerapp delete command is used to remove container app.

az containerapp delete \
     --name my-container-app1 \
     --resource-group myResourceGroup1 

Delete resource group - az group delete command is used to remove resource group, container registry, and container images, etc.

az group delete \
     --name myResourceGroup1

Summary

This article described how to create container application environment, deploy the container and verify running app in Azure using Azure CLI. Following table summarizes the key commands used in this article: