Skip to content

Latest commit

 

History

History
58 lines (36 loc) · 1.14 KB

README-createImageForTest.md

File metadata and controls

58 lines (36 loc) · 1.14 KB

How to create an Azure container registry and push the image in there - Azure CLI

Reference https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-docker-cli?tabs=azure-cli

1. Login to Azure

Sample:

az login

2. Create Azure container registry

Sample:

az acr create --resource-group <resource-group-name> --name <acr-name> --sku Basic

Reference https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-azure-cli

Reference: https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli

3. Login to Azure Container Registry

Change "acr-name" with your container registry name.

Sample:

az acr login --name <acr-name>

4. Pull a public image

This image is an example image.

Sample:

docker pull mcr.microsoft.com/azuredocs/aks-helloworld:v1

5. Create an alias of the image

Sample:

docker tag mcr.microsoft.com/azuredocs/aks-helloworld:v1 <acr-name>.azurecr.io/samples/test

6. Push the image to your registry

Sample:

docker push <acr-name>.azurecr.io/samples/test