Get your applications running in containers on Azure, fast.
Welcome to the Azure Container Quickstart! This guide will walk you through the essential steps to deploy and manage your containerized applications on Microsoft Azure. Whether you're new to containers or looking to leverage Azure's robust platform, this quickstart will set you on the right path.
Containers package an application and all its dependencies together, ensuring it runs consistently across different environments. Azure offers a variety of services to host and orchestrate your containers, including:
Before you begin, ensure you have the following:
Open your terminal or command prompt and sign in to your Azure account:
az login
This will open a browser window for authentication. Follow the prompts to complete the sign-in process.
A resource group is a logical container for your Azure resources. Create one for this quickstart:
az group create --name MyContainerResourceGroup --location eastus
Replace MyContainerResourceGroup
and eastus
with your desired names and Azure region.
ACI is the simplest way to run a container on Azure without managing underlying infrastructure. Let's deploy a sample application:
az container create --resource-group MyContainerResourceGroup --name my-container-app --image mcr.microsoft.com/azuredocs/aci-helloworld --dns-name-label my-aci-helloworld-app --ports 80
This command deploys the aci-helloworld
image and exposes it on port 80. The --dns-name-label
creates a public DNS name for your container.
Once the deployment is complete, you can access your application via its public IP address or FQDN. First, get the IP address:
az container show --resource-group MyContainerResourceGroup --name my-container-app --query ipAddress.fqdn --output tsv
Copy the outputted FQDN (Fully Qualified Domain Name) and paste it into your web browser. You should see the Azure hello world sample page.
To avoid incurring further charges, delete the resource group and all its resources:
az group delete --name MyContainerResourceGroup --yes --no-wait
This command deletes the resource group and all resources within it.
This was a basic introduction. Explore deploying to Azure Kubernetes Service (AKS) for more complex orchestration, setting up Azure Container Registry (ACR) for your private images, and leveraging other Azure services like Azure App Service for containerized web apps.