Azure Container Registry Operations

From NovaOrdis Knowledge Base
Revision as of 23:13, 12 April 2021 by Ovidiu (talk | contribs)
Jump to navigation Jump to search

External

Internal

Create

Portal

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

https://portal.azure.com/ → Create a Resource → Containers → Container Registry

Subscription:

Resource group → Create New

Registry name.

The name may contain only alpha numeric characters and be between 5 and 50 characters.

Name: aksdev.

Will be available as askdevcr.azurecr.io

CLI

Push an Image to Registry

Login. Specify only the registry name when logging in with the Azure CLI. Don't use the login server name, which includes a domain suffix like azurecr.io.

az acr login --name <registry-name>
az acr login --name aksdev

Then push an image available in the local docker cache, tag the image with a new name that contains the image of the login server and push:

docker tag <some-image> <login-server>/<image-name>[:tag]
docker push <login-server>/<image-name>[:tag]
docker tag ovidiufeodorov/httpd:latest aksdev.azurecr.io/http:latest
docker push aksdev.azurecr.io/http:latest