How to create Azure Web App for Containers

The last few days I struggled a lot to create an Azure Web App for Containers resource using the Azure Portal. My use case was to deploy a windows based (windowsservercore) docker image that is stored inside an Azure Container Registry (ACR) to an Azure Web App. If you are also unable to provision Azure Web App for Containers, this article might help you.

How it doesn’t work (anymore)

If you search for “Web App for Containers” in the marketplace you will find the following offer:

webappcontainermarketplace

Previously that was the right way to go. But right now it looks like there is a bug in the “Configuration Container” blade. No matter what Image Source I try to select, I am unable to apply the configuration. I also tested it with different browsers and Azure Accounts. The issue is always the same: The button keeps spinning and doesn’t return to the previous blade:

loop

This is the error I get in the browser Console:

main.9b48674960c2e585cd46.bundle.js:1 Error: resourceId length is too short:
at new e (main.9b48674960c2e585cd46.bundle.js:1)
at e.validateContainerImage (functions.azure.com/ng-min/1.044a6c8d0435c0124e13.chunk.js:1)
at e._validateContainerImage (functions.azure.com/ng-min/1.044a6c8d0435c0124e13.chunk.js:1)
at e.applyContainerConfig (functions.azure.com/ng-min/1.044a6c8d0435c0124e13.chunk.js:1)
at t.clickApply (functions.azure.com/ng-min/1.044a6c8d0435c0124e13.chunk.js:1)
at Object.handleEvent (functions.azure.com/ng-min/1.044a6c8d0435c0124e13.chunk.js:1)
at Object.handleEvent (main.9b48674960c2e585cd46.bundle.js:1)
at Object.handleEvent (main.9b48674960c2e585cd46.bundle.js:1)
at Jr (main.9b48674960c2e585cd46.bundle.js:1)
at main.9b48674960c2e585cd46.bundle.js:1

Fortunately someone on StackOverflow got an answer from Microsoft to that issue:

With the recent change in the portal to new full screen create experience, the Web App for Containers portal creation entry point regressed.

How it does work now

Instead of using the Web App for Containers offer, the workaround right now is to instead use the common Web App create experience and then choose “Docker Image” in the Publish option:

webapppublish

Inside the next Tab “Docker“, you can then choose the same options that were available before in the Web App for Containers experience:

docker

Note: If you wan’t to automate your deployment using Azure DevOps, the Task you are looking for is still Azure Web App for Containers.