question

Sumati-0206 avatar image
0 Votes"
Sumati-0206 asked ·

Azure App service for windows containers using Azure Powershell Automation

I am trying to deploy the ASP.NET MVC containered image to Azure App Service using powershell Automation.Succedeed to do it manully. Did the following steps.
1. Created .NET MVC application
2. Containerized using docker, placed it in the ACR and Docker.
3. Published it ot AZure Appservice manully by selecting Docker Windows container succeeded
4. Trying to do the same using PowerShell Automation.

But getting the following issue.

Hey, App Service developers!

Your app service is up and running.
Time to take the next step and deploy your code.
Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.


azure-webapps
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JMod-5649 avatar image
0 Votes"
JMod-5649 answered ·

Hi Sumati-0206,

The link below will walk you through the entire process using the Azure CLI. I know you asked for PowerShell, but you can use it as a reference as there are many steps required if you are trying to fully script everything from containerization to deployment.

Tutorial: Build a custom image and run in App Service from a private registry

It looks like your App Service is running based on the portal messaging you received back, so the issue may be with publishing to the Azure Container Registry or creating the Web App from your container. To troubleshoot adding your container to the registry, please see this link which has instructions provided in PowerShell:

Quickstart: Create a private container registry using Azure PowerShell

If your container is uploading fine but you're having trouble deploying a Web App from it, check that you are including the container permissions when creating the Web App and that the permissions you are supplying can access the container. For more info you can refer to the New-AzureRmWebApp documentation:

New-AzureRmWebApp

Also, if you'd like your Web App to update every time there is a new container uploaded to the Azure Container Registry, go to the Container settings page of your App Service and turn on Continuous Deployment. You could always create the Web App manually once and then enable this setting if you were trying to automate updates to the same Web App.

Hope that helps!


· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.