# Prerequisite
# 1) Install azure-cli curl, jq
registry="myregistry.azurecr.io"
scope_catalog="registry:catalog:*"
scope_repo_metadata="repository:*:metadata_read"
# Assume the client can login to azure using a managed identity
az login --identity
# Prerequisite
# 1) Install az-cli, docker, oras (0.16+), jq
registry="myregistry.azurecr.io"
repo="myimage"
tag="mytag"
reference=$registry/$myimage:$mytag
az login
#!/bin/bash
# Prerequisite
# 1) Install azure-cli
registry="myregistry"
repo="myimage"
tag="mytag"
# Prerequisite
# 1) Install azure-cli, oras
import_artifact_tree()
{
local reference=$1
local artifacts
local artifact
- [NOTE] Windows image by default has one or two base layers hosted in Azure CDN seperately (a.k.a foreign layers). The client will download these foreign layers from Azure CDN directly.
sequenceDiagram
Docker->>+ACR: [Head] <registry>.azurecr.io/v2/library/hello-world/manifests/latest
Note right of ACR: All manifest request accept-header includes <br>application/vnd.oci.image.manifest.v1+json,<br>application/vnd.docker.distribution.manifest.v2+json,<br>application/vnd.docker.distribution.manifest.list.v2+json,<br>application/vnd.oci.image.index.v1+json,<br>application/vnd.docker.distribution.manifest.v1+prettyjws,<br>application/json
ACR->>Docker: Manifest Digest: sha256:f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4
Docker->>+ACR: [GET] <registry>.azurecr.io/v2/library/hello-world/manifests/sha256:f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4
# Prerequisite
# 1) Install azure-cli curl, jq
registry="myregistry.azurecr.io"
scope_catalog="registry:catalog:*"
scope_repo_metadata="repository:*:metadata_read"
# az login --identity
acr_refresh_token=$(az acr login --name $registry --expose-token | jq -r ".accessToken")