az containerapp up command is not uploading my docker image to Azure

Daniel Zohar 20 Reputation points
2024-02-04T09:39:13.42+00:00

I am using the following tutorial to try to deploy my docker image to Azure: https://learn.microsoft.com/en-us/azure/developer/python/tutorial-containerize-simple-web-app?tabs=web-app-fastapi I am following the tutorial but using my code instead of the github repository written at the beginning, and when I get to the following command:
az containerapp up --resource-group web-fastapi-aca-rg --name web-aca-app --ingress external --target-port 3100 --source . (I write my own resource group name and app name) I get the following result:
Using resource group 'sd_using_ai' Creating ContainerAppEnvironment 'databasehw3-env' in resource group sd_using_ai No Log Analytics workspace provided. Generating a Log Analytics workspace with name "workspace-sdusingaiTnki" Creating Azure Container Registry ca14bdd9c2c7acr in resource group sd_using_ai No resource or more than one were found with name 'ca14bdd9c2c7acr'. I am a novice when it comes to azure and docker so any advice would be appreciated...

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
346 questions
{count} votes

Accepted answer
  1. Saravanan Ganesan 1,825 Reputation points MVP
    2024-02-04T17:42:27.6833333+00:00

    Hi Daniel ,

    It seems there might be an issue with the Azure Container Registry (ACR) creation. The error indicates a naming conflict or an issue retrieving the ACR resource. Verify that the ACR name is unique and try specifying a different name for your registry. Additionally, ensure you have the required permissions and that the resource group specified in the command matches your ACR's resource group. Double-check your Azure CLI context and credentials. If the problem persists, create the ACR separately using az acr create before deploying the container. Regards , Saravanan Ganesan.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Pinaki Ghatak 3,265 Reputation points Microsoft Employee
    2024-02-05T08:19:21.73+00:00

    Hello @Daniel Zohar The error message you’re seeing, “No resource or more than one were found with name ‘ca14bdd9c2c7acr’”, typically occurs when Azure Resource Manager can’t find the resource in your subscription. Here are a few potential solutions:

    1. Check resource properties: Make sure the values you provided for the resource are correct. The three values to check are: Resource name, Resource group name, and Subscription.
    2. Set dependencies: If you get this error when deploying a template, you may need to add a dependency. Resource Manager optimizes deployments by creating resources in parallel, when possible. For example, when you deploy a web app, the App Service plan must exist. If you haven’t specified that the web app depends on the App Service plan, Resource Manager creates both resources at the same time. The web app fails with an error that the App Service plan resource can’t be found because it doesn’t exist yet.
    3. You prevent this error by setting a dependency in the web app.

    If these solutions don’t work, you might want to check out Microsoft’s guide on how to troubleshoot common Azure deployment errors. I hope this answers your question.

    0 comments No comments