An administrator has created an Azure Container Registry named `contosoregistry`. On your local machine, you have a Docker image named `webapp:v1` that is tagged as `contosoregistry.azurecr.io/webapp:v1`. You have successfully run `az acr login --name contosoregistry` to authenticate. Which command must you run to upload this image to your registry?
- docker push contosoregistry.azurecr.io/webapp:v1Answer
- Baz acr push --name contosoregistry --image webapp:v1
- Cdocker push contosoregistry/webapp:v1
- Daz acr login --name contosoregistry --push webapp:v1
Answer
docker push contosoregistry.azurecr.io/webapp:v1
To push an image to Azure Container Registry, you must tag the image with the registry's login server domain name (such as contosoregistry.azurecr.io) and then invoke the standard docker push command. The docker push command uses the registry domain name to locate the registry endpoint and upload the image layers.
Step-by-Step Solution
Key Concept
Using the Docker CLI to push container images to an authenticated Azure Container Registry