Let’s push our hello world to Azure Registry. You can check it out here.
First we must install the Azure CLI on our linux vm. Run the installer script.
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
Next sign in to Azure on your Linux vm.
Next sign in to the azure container registry, Don’t include the ‘azurecr.io’ domain suffix.
az acr login --name
Next tag the hello world image with your container registry name. The login server name is in the format <registry-name>.azurecr.io (all lowercase), for example, mycontainerregistry.azurecr.io.
docker tag hello-world /hello-azure-world:v1
Perfect! Now with the tag let’s push to our registry!
docker push /hello-azure-world:v1
Let’s quickly jump over to the Azure portal and check our uploaded image.
You can also check from az cli with
az acr repository list -n registryname
And finally you can now download your own hello world container from your very own Azure Container Registry!
docker run /hello-azure-world:v1
There you go! You just uploaded your very own Docker image to an Azure Container Registry and deployed it.
Now in the last post we will create an Docker instance from our hello world