skip to content
Alvin Lucillo

Creating a webapp for containers

/ 1 min read

To create a webapp based on an image, you need to have an existing service plan, which is basically what defines the platform your app will be hosted in. The webapp will be visible in the App Service in the portal.

az webapp create \
    --resource-group $RESOURCE_GROUP \
    --plan $APP_PLAN \
    --name $APP_NAME \
    --container-image-name $ACR_NAME.azurecr.io/docprocessor:v1
{
  "defaultHostName": "app-docprocessor-e357b213.azurewebsites.net",
  "enabled": true,
  "id": "/subscriptions/<redacted>/resourceGroups/acr-task-demo/providers/Microsoft.Web/sites/app-docprocessor-e357b213",
  "identity": null,
  "kind": "app,linux,container",
  "location": "East Asia",
  "name": "app-docprocessor-e357b213",
  "publicNetworkAccess": "Enabled",
  "resourceGroup": "acr-task-demo",
  "serverFarmId": "/subscriptions/<redacted>/resourceGroups/acr-task-demo/providers/Microsoft.Web/serverfarms/plan-docprocessor-e357b213",
  "sku": "Basic",
  "state": "Running",
  "type": "Microsoft.Web/sites"
}