Skip to content
This repository has been archived by the owner on Aug 31, 2019. It is now read-only.

Latest commit

 

History

History
44 lines (32 loc) · 1.14 KB

aci-quickstart.md

File metadata and controls

44 lines (32 loc) · 1.14 KB

Quickstart Azure Container Instances (ACI) - Running API in ACI

Regsiter ACI service provider

Check the status of the ACI provider

az provider list --query "[?contains(namespace,'Microsoft.ContainerInstance')]" -o table

If the provider shows as NotRegistered, register the provider as shown in the following example:

az provider register --namespace Microsoft.ContainerInstance

Deploy API Container In ACI

First create resource group for this lab. Please note that region needs to be the following ACI available regions:

westus,eastus,westeurope,westus2,northeurope,southeastasia,eastus2,centralus,australiaeast,southcentralus,centralindia,canadacentral

RESOURCE_GROUP="RG-apim"
REGION="southeastasia"

az group create -n $RESOURCE_GROUP -l $REGION

Then, create API in Azure Container Instance

PREFIX="yoichika"
az container create --name "${PREFIX}-api" \
  --resource-group $RESOURCE_GROUP \
  --image "danielscholl/demoapi" \
  --dns-name-label "${PREFIX}-api" \
  --ports 80

Access Test

open "http://${PREFIX}-api.${REGION}.azurecontainer.io/index.html"