Enable Artifact Cache with authentication - Azure portal
This article is part four of a six-part tutorial series. Part one provides an overview of Artifact Cache, its features, benefits, and limitations. In part two, you learn how to enable Artifact Cache feature by using the Azure portal. In part three , you learn how to enable Artifact Cache feature by using the Azure CLI.
This article walks you through the steps of enabling Artifact Cache with authentication by using the Azure portal. You have to use the Credential set to make an authenticated pull or to access a private repository.
Prerequisites
- Sign in to the Azure portal.
- You have an existing Key Vault to store credentials. Learn more about creating and storing credentials in a Key Vault.
- You have the existing Key vaults without the RBAC controls.
Configure Artifact Cache with authentication - Azure portal
Follow the steps to create cache rule in the Azure portal.
Navigate to your Azure Container Registry.
In the side Menu, under the Services, select Cache .
Select Create Rule.
A window for New cache rule appears.
Enter the Rule name.
Select Source Registry from the dropdown menu.
Enter the Repository Path to the artifacts you want to cache.
For adding authentication to the repository, check the Authentication box.
Choose Create new credentials to create a new set of credentials to store the username and password for your source registry. Learn how to create new credentials
If you have the credentials ready, Select credentials from the drop-down menu.
Under the Destination, Enter the name of the New ACR Repository Namespace to store cached artifacts.
Select on Save
Pull the image from your cache using the Docker command by the registry login server name, repository name, and its desired tag.
- For example, to pull the image from the repository
hello-world
with its desired taglatest
for a given registry login servermyregistry.azurecr.io
.
docker pull myregistry.azurecr.io/hello-world:latest
- For example, to pull the image from the repository
Create new Credentials
Before configuring the Credentials, you require to create and store secrets in the Azure KeyVault and retrieve the secrets from the Key Vault. Learn more about creating and storing credentials in a Key Vault. and to set and retrieve a secret from Key Vault..
Navigate to Credentials > Create credentials.
Enter Name for the new credentials for your source registry.
Select a Source Authentication. Artifact Cache currently supports Select from Key Vault and Enter secret URI's.
For the Select from Key Vault option, Learn more about creating credentials using key vault.
Select on Create
Next steps
- Advance to the next article to enable the Artifact Cache using Azure CLI.
Tilbakemeldinger
https://aka.ms/ContentUserFeedback.
Kommer snart: Gjennom 2024 faser vi ut GitHub Issues som tilbakemeldingsmekanisme for innhold, og erstatter det med et nytt system for tilbakemeldinger. Hvis du vil ha mer informasjon, kan du se:Send inn og vis tilbakemelding for