Training
Module
Deploy and use Azure Container Registry - Training
Learn how to create a private registry service for building, storing, and managing container images and related artifacts.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The Azure Operator Service Manager (AOSM) artifact store resource manages the artifacts required to deploy network functions (NFs). These artifacts include containerized network function (CNF) images, virtualized network function (VNF) images, Azure Resource Manager (ARM) templates, and Helm packages. There are two flavors of artifact store:
The Azure CLI AOSM extension provides a command to push all the artifacts needed by a CNF or VNF on Azure Operator Nexus. There are some use cases where you might need to push artifacts to or pull them from an artifact store individually.
This How-To article describes how to push artifacts to and pull artifacts from an existing ACR-backed artifact store using the AOSM Artifact Manifest resource and the ORAS command line tool. See this How-To for the equivalent article for Storage Account backed artifact stores.
resource acrArtifactManifest 'Microsoft.Hybridnetwork/publishers/artifactStores/artifactManifests@2023-09-01' = {
parent: 'contoso-cnf-store'
name: 'contoso-cnf-manifest'
location: 'eastus'
properties: {
artifacts: [
{
artifactName: 'contoso-cnf-container'
artifactType: 'OCIArtifact'
artifactVersion: '0.1.0'
}
]
}
}
Get repository-scoped permissions from the artifact manifest resource
az rest --method POST --url 'https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.HybridNetwork/publishers/<publisher>/artifactStores/<artifact-store-name>/artifactManifests/<artifact-manifest-name>/listCredential?api-version=2023-09-01'
This command returns the username and password you'll use to sign in to the ACR backing the artifact store. The password is in the token
field.
{
"acrServerUrl": "https://<acr-name>.azurecr.io",
"acrToken": "<token>",
"credentialType": "AzureContainerRegistryScopedToken",
"expiry": "2024-03-27T10:25:03.9217887+00:00",
"repositories": [
"<artifact-name>"
],
"username": "<artifact-manifest-name>"
}
Important
The artifact manifest resource grants tightly scoped permissions for push and pull operations. You must use an artifact manifest that contains an entry for the artifact you want to push or pull. The artifactName
must match the artifact name in the repository. The artifactVersion
must match the artifact tag
Find the name of the ACR that backs the artifact store resource by opening the navigating to the artifact store and copying the Backing storage
field
Sign in to the ACR using the ORAS CLI
oras login <acr-name>.azurecr.io --username <artifact-manifest-name> --password <token>
<artifact-name>
must match the artifactName
property in the artifact manifest. The <artifact-tag>
must match the artifactVersion
property in the artifact manifest. The <artifact-tag>
must be in 1.0.0
formatoras push <acr-name>.azurecr.io/<artifact-name>:<artifact-tag> </path/to/artifact>
oras pull <acr-name>.azurecr.io/<artifact-name>:<artifact-tag>
Training
Module
Deploy and use Azure Container Registry - Training
Learn how to create a private registry service for building, storing, and managing container images and related artifacts.
Documentation
Manage OCI Artifacts and Supply Chain Artifacts with ORAS - Azure Container Registry
A comprehensive guide on how to use Azure Container Registry to store, manage, and retrieve OCI and supply chain artifacts.
Import Container Images to ACR using Azure APIs - Azure Container Registry
Import container images to an Azure container registry by using Azure APIs, without needing to run Docker commands.
Answers for frequently asked questions related to the Azure Container Registry service