| title | Quickstart: Deploy your first container app with containerapp up |
|---|---|
| description | Deploy your first application to Azure Container Apps using the Azure CLI containerapp up command. |
| services | container-apps |
| author | craigshoemaker |
| ms.service | azure-container-apps |
| ms.topic | quickstart |
| ms.date | 02/03/2025 |
| ms.author | cshoe |
| ms.custom | devx-track-azurecli |
| ms.devlang | azurecli |
The Azure Container Apps service enables you to run microservices and containerized applications on a serverless platform. With Container Apps, you enjoy the benefits of running containers while you leave behind the concerns of manually configuring cloud infrastructure and complex container orchestrators.
In this quickstart, you create and deploy your first container app using the az containerapp up command.
- An Azure account with an active subscription.
- If you don't have one, you can create one for free.
- Install the Azure CLI.
[!INCLUDE container-apps-create-cli-steps.md]
Create and deploy your first container app with the containerapp up command. This command will:
- Create the Container Apps environment
- Create the Log Analytics workspace
- Create and deploy the container app using a public container image
Note that if any of these resources already exist, the command will use them instead of creating new ones.
az containerapp up \
--name my-container-app \
--resource-group my-container-apps \
--location centralus \
--environment 'my-container-apps' \
--image mcr.microsoft.com/k8se/quickstart:latest \
--target-port 80 \
--ingress external \
--query properties.configuration.ingress.fqdn
az containerapp up `
--name my-container-app `
--resource-group my-container-apps `
--location centralus `
--environment my-container-apps `
--image mcr.microsoft.com/k8se/quickstart:latest `
--target-port 80 `
--ingress external `
--query properties.configuration.ingress.fqdnNote
Make sure the value for the --image parameter is in lower case.
By setting --ingress to external, you make the container app available to public requests.
The up command returns the fully qualified domain name for the container app. Copy this location to a web browser.
The following message is displayed when the container app is deployed:
:::image type="content" source="media/get-started/azure-container-apps-quickstart.png" alt-text="Screenshot of container app web page.":::
If you're not going to continue to use this application, run the following command to delete the resource group along with all the resources created in this quickstart.
Caution
The following command deletes the specified resource group and all resources contained within it. If resources outside the scope of this quickstart exist in the specified resource group, they will also be deleted.
az group delete --name my-container-apps
Tip
Having issues? Let us know on GitHub by opening an issue in the Azure Container Apps repo.
[!div class="nextstepaction"] Communication between microservices