TExcelTAD
Home › Azure & Google Cloud for AWS Users › Container Registries: ACR and Artifact Registry

Container Registries: ACR and Artifact Registry

Every cloud has a private OCI registry next to its compute, with identity-based pulls, vulnerability scanning and replication. ECR maps to Azure Container Registry (ACR) and to Google's Artifact Registry, which also stores language packages (npm, Maven, Python, Go) and OS packages.

On AWS this is… Amazon ECR, from Containers: ECS, EKS, Fargate, ECR. For signing and scanning in depth, see Software Supply Chain Security.

Side by side

AWS ECR Azure Container Registry Google Artifact Registry
Unit registry per account and region, repositories inside registry (global name acrshopprod.azurecr.io), repositories created on push repository per location and format, in a project
Image path 111122223333.dkr.ecr.eu-west-1.amazonaws.com/shop/api:1.4.2 acrshopprod.azurecr.io/shop/api:1.4.2 europe-west1-docker.pkg.dev/shop-prod-4821/shop/api:1.4.2
Tiers one Basic, Standard, Premium (Premium: geo-replication, private endpoints, more throughput) one (pricing by storage and egress)
Login aws ecr get-login-password | docker login … az acr login -n acrshopprod gcloud auth configure-docker europe-west1-docker.pkg.dev (credential helper)
Pull from managed K8s node IAM role / Pod Identity az aks update --attach-acr (grants AcrPull to the kubelet identity) node service account with roles/artifactregistry.reader (same project works by default)
Build in the cloud CodeBuild ACR Tasks (az acr build) Cloud Build (gcloud builds submit)
Other formats — (CodeArtifact is separate) Helm charts and OCI artifacts npm, Maven, Python, Go, apt, yum, Helm, generic
Proxy upstreams pull-through cache artifact cache rules remote repositories (Docker Hub, PyPI, …) and virtual repositories
Replication cross-region replication rules geo-replication (Premium) multi-region locations (europe, us, asia)
Immutable tags yes locks on images (--write-enabled false) immutable tags setting per repository

Google's older Container Registry (gcr.io) has been shut down; gcr.io hostnames are now served by Artifact Registry repositories. If you find gcr.io/... in old manifests, the images live in Artifact Registry now, under the newer *.pkg.dev model or gcr.io repositories.

Model: building image references

Image paths are the most-copied, most-mistyped strings in a pipeline. A helper that builds them from the same inputs:

python · try it yourself
def image_ref(cloud, repo, image, tag, **ctx):
    if cloud == "aws":
        host = f"{ctx['account']}.dkr.ecr.{ctx['region']}.amazonaws.com"
        return f"{host}/{repo}/{image}:{tag}"
    if cloud == "azure":
        return f"{ctx['registry']}.azurecr.io/{repo}/{image}:{tag}"
    if cloud == "gcp":
        return f"{ctx['location']}-docker.pkg.dev/{ctx['project']}/{repo}/{image}:{tag}"
    raise ValueError(cloud)

refs = [
    image_ref("aws", "shop", "api", "1.4.2", account="111122223333", region="eu-west-1"),
    image_ref("azure", "shop", "api", "1.4.2", registry="acrshopprod"),
    image_ref("gcp", "shop", "api", "1.4.2", location="europe-west1", project="shop-prod-4821"),
]
for r in refs:
    host, _, path = r.partition("/")
    print(f"{host:<45} {path}")
111122223333.dkr.ecr.eu-west-1.amazonaws.com  shop/api:1.4.2
acrshopprod.azurecr.io                        shop/api:1.4.2
europe-west1-docker.pkg.dev                   shop-prod-4821/shop/api:1.4.2

In Artifact Registry, the first path segment after the host is the project, then the repository (shop), then the image. In ACR and ECR, shop/api is just a repository name with a slash in it.

Push and pull

Azure, sample session:

bash
az acr create -g rg-shop-prod-app -n acrshopprod --sku Premium --admin-enabled false
az acr login -n acrshopprod
docker tag shop-api:1.4.2 acrshopprod.azurecr.io/shop/api:1.4.2
docker push acrshopprod.azurecr.io/shop/api:1.4.2

az acr build -r acrshopprod -t shop/api:1.4.3 .          # build in Azure, no local Docker needed
az acr repository show-tags -n acrshopprod --repository shop/api -o table
az aks update -g rg-shop-prod-app -n aks-shop-prod --attach-acr acrshopprod

--admin-enabled false keeps the registry's shared admin username/password off; use Entra identities (AcrPush for CI, AcrPull for runtimes).

Google Cloud, sample session:

bash
gcloud artifacts repositories create shop --repository-format=docker \
    --location=europe-west1 --description="shop images"
gcloud auth configure-docker europe-west1-docker.pkg.dev
docker tag shop-api:1.4.2 europe-west1-docker.pkg.dev/shop-prod-4821/shop/api:1.4.2
docker push europe-west1-docker.pkg.dev/shop-prod-4821/shop/api:1.4.2

gcloud builds submit --tag=europe-west1-docker.pkg.dev/shop-prod-4821/shop/api:1.4.3 .
gcloud artifacts docker images list europe-west1-docker.pkg.dev/shop-prod-4821/shop --include-tags

Sample output of the last command:

text
IMAGE                                                        DIGEST                                                                   TAGS   CREATE_TIME          UPDATE_TIME
europe-west1-docker.pkg.dev/shop-prod-4821/shop/api          sha256:4f2a9c1e0b7d8a6f3e5c2b1a0d9e8f7c6b5a4d3e2f1a0b9c8d7e6f5a4b3c2d1e  1.4.2  2026-10-26T09:12:40  2026-10-26T09:12:40
europe-west1-docker.pkg.dev/shop-prod-4821/shop/api          sha256:9b8a7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b  1.4.3  2026-10-26T10:03:15  2026-10-26T10:03:15

Scanning and cleanup

  • Scanning: Microsoft Defender for Containers scans ACR images; Artifact Registry uses Artifact Analysis (on-push and continuous scanning, enabled per project). Both are paid features; check current pricing. Open-source scanners from the supply chain course work against any of these registries.
  • Cleanup: Artifact Registry cleanup policies (keep the N most recent versions, delete untagged after N days); ACR retention policy for untagged manifests (Premium) and az acr run purge tasks. Without cleanup, registries quietly grow forever.
  • Deploy by digest: whichever registry, deploy …@sha256: digests rather than tags in production.

Test yourself

In europe-west1-docker.pkg.dev/shop-prod-4821/shop/api:1.4.2, what is shop?

  1. The project
  2. The Artifact Registry repository
  3. The image tag
  4. The region

What does az aks update --attach-acr acrshopprod do?

  1. Copies images into the cluster
  2. Grants the cluster's kubelet identity AcrPull on the registry
  3. Enables the admin account
  4. Creates a pull secret in every namespace

What happened to Google Container Registry (gcr.io)?

  1. It is the recommended registry
  2. It has been shut down; gcr.io is served by Artifact Registry
  3. It only stores Helm charts
  4. It moved to Azure