question

SaiSuprajaRajasekhar-2069 avatar image
0 Votes"
SaiSuprajaRajasekhar-2069 asked ryanchill commented

Failed to deploy Image from ACR into App service

HI Team,
I have built a docker Image and pushed into Azure Container registry from Azure devops portal. I am trying to deploy the image from ACR into App service via "Azure Webapp for container" task.
When I do it, I am getting the below error

##[error]Error: Failed to patch App Service 'XXXappservicenameXXX' configuration. Error: BadRequest - The parameter WindowsFxVersion has an invalid value. Could not find the specified image name and tag combination. For private registries, make sure you are prepending the image name with the server hostname. https://mcr.microsoft.com (CODE: 400)

Solutions tried:
1) Tried to update the Container setting -> ACR-> gave the explicit values. Got the below error:

##[error]Error: Failed to patch App Service 'APPservicename' configuration. Error: BadRequest - The parameter DOCKER_REGISTRY_SERVER_URL has an invalid value. Unexpected error when connecting to the registry. Cannot find available registry. http://appservicename.azurecr.io (CODE: 400)

Please provide a solution to get this resolved.

Thanks,
Sai

azure-webapps-content-deploymentazure-container-registry
5 |1600 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

ryanchill avatar image
0 Votes"
ryanchill answered ryanchill commented

How is your Azure Web App for Container task configured @SaiSuprajaRajasekhar-2069? Specifically, configurationStrings? How did you create the App Service beforehand? WindowsFxVersion appears to be a misconfiguration issue between the App Service and Azure DevOps task. If you continue to have issues with Azure Web App for Container task, it would be best to post those issues over at https://developercommunity.visualstudio.com/search?space=22.

Secondly,

Error: BadRequest - The parameter DOCKER_REGISTRY_SERVER_URL has an invalid value.

appears that you have the wrong URL. Make sure that the URI for your image:tag is correct and that it can successfully pulled via docker. I know you have obfuscated your registry endpoint; but you used http://appservicename.azurecr.io and just want to reiterate that the container registry is a separate resource from the app service. They can be named the same but it's not a customary practice.

Regards,
Ryan


· 2
5 |1600 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.

Thanks for the update @ryanchill .

We tried to create the App service with public endpoint and then made a service connection with azure devops.
We also tried to give the image name explicitly in App service configuration tab in azure portal.
Then rebuilt and deployed the image. It worked.


Also do we need any additional setting for App service with private endpoints?
Please advise.

0 Votes 0 ·
ryanchill avatar image ryanchill SaiSuprajaRajasekhar-2069 ·

Please review the private endpoint documentation. From the app service settings standpoint, you just need to enable it. However, you'll need to configure the routing so you can access your app service.


0 Votes 0 ·