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.