Search⌘ K

Deploying Applications to Azure Container Instances

Explore how to deploy containerized applications to Azure Container Instances, verify their status and accessibility, and perform load testing with Siege. Understand the service's limitations, including lack of orchestration and scaling, and learn how to remove deployed resources.

Deploying the application

Now we have everything we need to deploy the container image into Azure Container Instances.

Shell
az container create \
--resource-group $RESOURCE_GROUP \
--name devops-toolkit \
--location $REGION \
--image $IMAGE \
--dns-name-label $SUBDOMAIN \
--ports 80 \
--registry-username $ACR_USER \
--registry-password $ACR_PASS

The output is a very long JSON with more information than we need for this exercise. You can explore it yourself. For now, we’ll focus on checking whether the container is indeed running. We can, for example, output the status of the container we just deployed.

Shell
az container show\
--resource-group $RESOURCE_GROUP \
--name devops-toolkit-series \
--out table

The most important part of the output is probably the “Status” column. It shows that the container is “Running.”

Now that we’re relatively confident the application is running or, at least, that Azure thinks it is, let’s check whether it’s accessible.

Since we’re not using a custom domain, the application is accessible through a subdomain of azurecontainer.io. The full address is predictable. It’s a subdomain constructed using the DNS label we have in the SUBDOMAIN variable and the region. For simplicity, we’ll ...