Unable to push images to Azure Container Registry

Jonathan Peers 0 Reputation points
2025-02-10T11:07:22.9566667+00:00

Hi there

We are having problems pubishing to an azure repository. The image isnt being updated/added

Publishing from visual studio shows no errors message and shows the publish has succeeded, but In azure the repository image has not updated.

Regards

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
481 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vinodh247 27,551 Reputation points MVP
    2025-02-10T13:06:17.3733333+00:00

    Hi ,

    Thanks for reaching out to Microsoft Q&A.

    Check If the Image Exists Locally

    Run the following command in the terminal (PowerShell or CMD) to check if the image exists:

    docker images

    Ensure the correct tag and repository name are assigned.

    Verify the ACR Repository

    Check your ACR in the Azure portal:

    • Navigate to Container Registry > Your ACR > Repositories
    • See if the image is listed or if it has an old timestamp.

    Manually Push the Image to ACR

    If the Visual Studio publish isn't working, try pushing manually:

    Login to ACR

    az acr login --name <your-acr-name>

    Tag the Image Correctly

    Ensure the image is tagged with the ACR name:

    docker tag <local-image-name> <your-acr-name>.azurecr.io/<repository-name>:latest

    Push the Image to ACR

    docker push <your-acr-name>.azurecr.io/<repository-name>:latest

    Check Visual Studio Docker Settings

    • In Visual Studio, go to Publish Profile
    • Ensure the correct Container Registry is selected
    • Check if the image name and tag are correctly specified

    Check for Cached Images

    If an old image is being used, try forcing a new build and push:

    docker build --no-cache -t <your-acr-name>.azurecr.io/<repository-name>:latest . docker push <your-acr-name>.azurecr.io/<repository-name>:latest

    Ensure ACR Authentication Works

    If authentication is an issue, try enabling Admin User in ACR settings:

    • Go to Container Registry in Azure
    • Select Access keys
    • Enable Admin User

    Then, use these credentials in Visual Studio or when running docker login:

    docker login <your-acr-name>.azurecr.io -u <username> -p <password>

    Check Azure DevOps Pipeline or ACR Tasks

    If you're using CI/CD, check if there are any tasks overriding the published image.

    Try these steps and let me know if the issue persists!

    Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.