Reputation: 31
When building my docker image locally and import it to Azure Container Registry (ACR), the Image platform is Windows. It should be Linux. How can I import my image as a Linux platform?
I am using this command to import the image to my ACR.
az acr import
Upvotes: 3
Views: 6537
Reputation: 497
Use the following command to import from another ACR from a different subscription.
az acr import --name <DESTINATION-ACR> --force\
--source <SOURCE-ACR-NAME>/IMAGE-NAME:IMAGE-TAG \
--image IMAGE-NAME:IMAGE-TAG \
--username <USERNAME> \
--password <PASSWORD>
Upvotes: 2
Reputation: 28294
By using the command az acr import
means that you can import an image to an Azure Container Registry from another Container Registry. So you should have container images from a public registry or another Azure container registry, in the same or a different Azure subscription or tenant or from a non-Azure private container registry. Read Import container images to a container registry for more details.
In this case, if you have built the images locally, you can push the images directly to the ACR instead of using import. You can make it as the Tutorial: Create an Azure container registry and push a container image:
log in to your Azure Container Registry instance
az acr login --name <acrName>
tag the image with the full name of the registry's login server.
docker tag <localImage> <acrLoginServer>/<acrRepository>:<tag>
Push image to Azure Container Registry
docker push <acrLoginServer>/<acrRepository>:<tag>
Upvotes: 1