title | description | services | author | ms.service | ms.topic | ms.date | ms.author | ms.custom | ms.devlang |
---|---|---|---|---|---|---|---|---|---|
Quickstart: Deploy your first container app |
Deploy your first application to Azure Container Apps. |
container-apps |
craigshoemaker |
container-apps |
quickstart |
03/21/2022 |
cshoe |
ignite-fall-2021, mode-api, devx-track-azurecli, event-tier1-build-2022 |
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 a secure Container Apps environment and deploy your first container app.
- 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]
To create the environment, run the following command:
az containerapp env create \
--name $CONTAINERAPPS_ENVIRONMENT \
--resource-group $RESOURCE_GROUP \
--location $LOCATION
az containerapp env create `
--name $CONTAINERAPPS_ENVIRONMENT `
--resource-group $RESOURCE_GROUP `
--location $LOCATION
Now that you have an environment created, you can deploy your first container app. With the containerapp create
command, deploy a container image to Azure Container Apps.
az containerapp create \
--name my-container-app \
--resource-group $RESOURCE_GROUP \
--environment $CONTAINERAPPS_ENVIRONMENT \
--image mcr.microsoft.com/azuredocs/containerapps-helloworld:latest \
--target-port 80 \
--ingress 'external' \
--query properties.configuration.ingress.fqdn
az containerapp create `
--name my-container-app `
--resource-group $RESOURCE_GROUP `
--environment $CONTAINERAPPS_ENVIRONMENT `
--image mcr.microsoft.com/azuredocs/containerapps-helloworld:latest `
--target-port 80 `
--ingress 'external' `
--query properties.configuration.ingress.fqdn
Note
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 create
command returned the fully qualified domain name for the container app. Copy this location to a web browser and see the following message:
:::image type="content" source="media/get-started/azure-container-apps-quickstart.png" alt-text="Your first Azure Container Apps deployment.":::
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.
az group delete \
--name $RESOURCE_GROUP
Remove-AzResourceGroup -Name $RESOURCE_GROUP -Force
Tip
Having issues? Let us know on GitHub by opening an issue in the Azure Container Apps repo.
[!div class="nextstepaction"] Environments in Azure Container Apps