Add azure-container-registry-cli skill - #2450
Conversation
🔒 PR Risk Scan ResultsScanned 6 changed file(s).
|
🔍 Vally Lint Results✅ All checks passed
Summary
Full linter output |
There was a problem hiding this comment.
Pull request overview
Adds an Azure Container Registry CLI skill with task-focused reference documentation.
Changes:
- Adds ACR setup, authentication, image, build, and networking guidance.
- Organizes detailed commands into four reference files.
- Registers the skill in generated documentation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
skills/azure-container-registry-cli/SKILL.md |
Defines skill routing and quick-start guidance. |
references/auth-and-security.md |
Covers identities, roles, tokens, and AKS. |
references/build-and-tasks.md |
Documents builds, tasks, triggers, and agent pools. |
references/images-and-artifacts.md |
Covers image lifecycle, caching, and retention. |
references/networking-and-geo.md |
Documents networking, replication, and transfers. |
docs/README.skills.md |
Adds the skill to the generated index. |
Comments suppressed due to low confidence (2)
skills/azure-container-registry-cli/references/networking-and-geo.md:38
- Zone redundancy is no longer a Premium creation-time option: Azure enables it automatically for all service tiers in supported regions, regardless of the resource property's displayed value. These commands teach an obsolete provisioning requirement.
Set at creation time (registry or replica) in supported regions:
```bash
az acr create --resource-group {rg} --name {registry} --sku Premium --zone-redundancy enabled
az acr replication create --registry {registry} --location westeurope --zone-redundancy enabled
skills/azure-container-registry-cli/references/networking-and-geo.md:83
- This does not fully let ACR Tasks through a network-restricted registry after the June 2025 policy change. For tasks using a system-assigned identity, explicitly enable
networkRuleBypassAllowedForTasksas well.
# Let trusted Azure services (e.g., ACR Tasks, Defender) through the firewall
az acr update --name {registry} --allow-trusted-services true
… network bypass) and secure credential handling
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Comments suppressed due to low confidence (6)
skills/azure-container-registry-cli/SKILL.md:53
- This SKU summary omits Premium-only public network rules, dedicated data endpoints, and transfer pipelines. Since the referenced networking guide uses all three, Basic/Standard users can otherwise be routed to commands their registry cannot enable.
- **Premium-only features**: geo-replication, private endpoints, retention policies, connected registries, agent pools. (Repository-scoped tokens work in all tiers; zone redundancy is automatic in all tiers in supported regions.)
skills/azure-container-registry-cli/SKILL.md:70
- Repository-scoped tokens and scope maps are available in Basic, Standard, and Premium, so labeling this command group Premium-only contradicts the detailed reference and can incorrectly discourage valid usage on lower tiers.
├── token / scope-map # Repository-scoped tokens (Premium)
skills/azure-container-registry-cli/references/auth-and-security.md:49
- Generic Azure
ContributorandOwnerroles provide control-plane management but do not grant ACR repository push/pull permissions, including in legacy RBAC mode. Claiming full data-plane access here can leave principals unable to pull or push until an explicit ACR role is assigned.
| `Contributor`/`Owner` | Full control-plane management + push/pull |
skills/azure-container-registry-cli/references/auth-and-security.md:65
- This generic grant always assigns
AcrPull, although the section just established that this role is ignored on ABAC-enabled registries. Show both mode-specific alternatives so the advertised user/group/service-principal/identity example works for either registry mode.
# Grant pull access to a user, group, service principal, or managed identity
az role assignment create --assignee {principal-id} --scope $ACR_ID --role AcrPull
skills/azure-container-registry-cli/references/auth-and-security.md:78
- This service-principal command silently fails to provide data-plane access on an ABAC-enabled registry because
AcrPullis not honored there. Label the mode and direct ABAC users to the corresponding Repository Reader role.
# Create an SP scoped to pull only
ACR_ID=$(az acr show --name {registry} --query id --output tsv)
az ad sp create-for-rbac --name {sp-name} --scopes $ACR_ID --role AcrPull
skills/azure-container-registry-cli/references/auth-and-security.md:94
- The managed-identity example also hard-codes the legacy-only
AcrPullrole, so it does not grant pull access on ABAC-enabled registries. Make the role substitution explicit here as well.
# Assign a system-assigned identity and grant it pull
az vm identity assign --name {vm} --resource-group {rg}
PRINCIPAL_ID=$(az vm show --name {vm} --resource-group {rg} --query identity.principalId --output tsv)
az role assignment create --assignee $PRINCIPAL_ID --scope $ACR_ID --role AcrPull
There was a problem hiding this comment.
Review details
Comments suppressed due to low confidence (7)
skills/azure-container-registry-cli/SKILL.md:70
- Repository-scoped tokens and scope maps are available in every ACR service tier, so labeling this command group as Premium-only is incorrect and contradicts both line 53 and the reference file. Basic/Standard users may incorrectly avoid a supported authentication option.
├── token / scope-map # Repository-scoped tokens (Premium)
skills/azure-container-registry-cli/references/auth-and-security.md:58
- Catalog Lister is only needed when the principal must enumerate repository names; known-repository pull/write operations do not require it. Saying it is needed alongside all repository roles encourages an unnecessary registry-wide permission.
| `Container Registry Repository Catalog Lister` | List repositories (needed alongside the roles above) |
skills/azure-container-registry-cli/references/auth-and-security.md:144
- The unquoted token password can be changed by shell word splitting or pathname expansion before it reaches
docker login. Preserve the generated credential exactly with a quoted expansion.
echo $TOKEN_PWD | docker login $LOGIN_SERVER --username {token} --password-stdin
skills/azure-container-registry-cli/references/auth-and-security.md:110
- This hardcodes the public-cloud login suffix despite line 29 warning that sovereign clouds and domain-name-label-scoped registries use different login servers. In those supported configurations,
check-acrtargets the wrong host; resolveloginServerfrom ACR instead.
az aks check-acr --name {cluster} --resource-group {rg} --acr {registry}.azurecr.io
skills/azure-container-registry-cli/references/auth-and-security.md:167
- As of the PR's current date, Docker Content Trust can no longer be enabled on new registries or registries that had not enabled it before May 31, 2026. This command therefore fails for new setups; the section should lead with the deprecation and direct new users to Notation/Notary Project.
## Content Trust
```bash
# Enable Docker Content Trust support (Premium)
az acr config content-trust update --registry {registry} --status enabled
skills/azure-container-registry-cli/references/networking-and-geo.md:12
- The file's Premium summary omits two Premium-only features documented below: public IP network rules and dedicated data endpoints. Basic/Standard users following those sections will receive unsupported-SKU errors, so include them in the prerequisite statement.
Geo-replication, private endpoints, connected registries, and transfer pipelines require the **Premium** SKU. Zone redundancy is automatic in every tier.
skills/azure-container-registry-cli/references/images-and-artifacts.md:135
- This sequence enables retention and then soft delete, but ACR rejects enabling both policies simultaneously. Soft delete is also a preview available in all service tiers, not Premium-only, and is unsupported with geo-replication or artifact cache. Split these into mutually exclusive alternatives so the documented commands can succeed.
# Soft delete (preview): recover deleted artifacts within the retention window
az acr config soft-delete update --registry {registry} --status enabled --days 7
- Files reviewed: 6/6 changed files
- Comments generated: 4
- Review effort level: Medium
|
There's a minor spelling issue that just requires an ignore to be added to the codespellrc file and a final pass on the current CCR coments would be good (close any that aren't relevant) |
… caveat, soft-delete tiers, Catalog Lister scope, secret quoting
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (11)
skills/azure-container-registry-cli/SKILL.md:70
- Repository-scoped tokens are available in Basic, Standard, and Premium, as this file already states on line 53 and the auth reference states on line 129. Labeling this command group Premium-only gives users contradictory SKU guidance.
├── token / scope-map # Repository-scoped tokens (Premium)
skills/azure-container-registry-cli/references/networking-and-geo.md:12
- This SKU warning omits two features documented later in this file: IP network rules and dedicated data endpoints are also Premium-only. Basic/Standard users following those sections will otherwise receive unsupported-feature errors.
Geo-replication, private endpoints, public IP network rules, dedicated data endpoints, connected registries, and transfer pipelines require the **Premium** SKU. Zone redundancy is automatic in every tier.
skills/azure-container-registry-cli/references/auth-and-security.md:58
- Catalog Lister is not required alongside the repository Reader/Writer/Contributor roles; it only permits enumerating repository names. Presenting it as required encourages broader registry visibility than consumers need.
| `Container Registry Repository Catalog Lister` | List repositories — assign only when the identity must enumerate the catalog (e.g., `az acr repository list`); not needed for pull/push of known repositories |
skills/azure-container-registry-cli/references/auth-and-security.md:124
- The kubelet only needs Repository Reader to pull a known image. Catalog Lister adds registry-wide repository enumeration and is not required for AKS image pulls, so this example grants unnecessary access.
--role "Container Registry Repository Reader"
# "Container Registry Repository Catalog Lister" is NOT needed for pulls —
skills/azure-container-registry-cli/references/auth-and-security.md:167
- As of May 31, 2026, Azure no longer allows Docker Content Trust to be enabled on new registries or registries that had not enabled it previously, so this command now fails for the skill's new-deployment audience. DCT is deprecated for retirement on March 31, 2028; current guidance should direct users to Notation/Notary Project instead.
Docker Content Trust (DCT) is being retired: **since May 31, 2026 it cannot be enabled on new registries** (or on registries that never enabled it), and it will be removed entirely on March 31, 2028. Do not set up DCT — sign images with **Notation (Notary Project)** and store signatures as OCI artifacts instead; see "Transition from Docker Content Trust to Notary Project" in the ACR docs.
skills/azure-container-registry-cli/references/build-and-tasks.md:101
- Omitting
--identitiesdoes not assign a system-managed identity, despite the comment. The task remains without a new identity, so the following credential command cannot authenticate as[system].
az acr task identity assign --registry {registry} --name build-app # system-assigned
skills/azure-container-registry-cli/references/build-and-tasks.md:132
- A VNet agent pool is not strictly required for every network-restricted registry: this skill's networking reference also documents trusted-services access plus the task network bypass policy for standard agents. Calling it required contradicts that supported alternative.
Premium SKU. Dedicated task compute — for more CPU, or one of the two supported ways to run tasks against a network-restricted registry (the other being trusted services + the task network bypass policy, see `networking-and-geo.md`):
skills/azure-container-registry-cli/references/images-and-artifacts.md:126
- ACR rejects enabling retention and soft delete simultaneously, but these adjacent commands currently read as one setup sequence. State that they are alternatives so users do not run the second command into a policy conflict.
## Retention Policy & Soft Delete
skills/azure-container-registry-cli/references/images-and-artifacts.md:136
- This example claims to recover deleted artifacts but only lists deleted repositories; it never shows the restore operation. Use the manifest commands so a user can identify and actually restore a deleted digest.
az acr config retention show --registry {registry}
# Soft delete (preview, all tiers): recover deleted artifacts within 1-90 days
skills/azure-container-registry-cli/references/networking-and-geo.md:132
- SAS-backed transfer pipelines require
--storage-access-mode SasToken. Without the required access mode, this export-pipeline command is incomplete and fails instead of using the supplied Key Vault secret.
--name export-pipe \
--secret-uri https://{vault}.vault.azure.net/secrets/{sas-secret} \
skills/azure-container-registry-cli/references/networking-and-geo.md:138
- The import pipeline also needs the required
--storage-access-mode SasTokenselection when--secret-urisupplies a SAS credential; otherwise this example is not executable.
--name import-pipe \
--secret-uri https://{vault}.vault.azure.net/secrets/{sas-secret} \
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (7)
skills/azure-container-registry-cli/SKILL.md:70
- This labels repository-scoped tokens as Premium-only, contradicting line 53 and the authentication reference; tokens and scope maps are available in every ACR service tier. The stale label can incorrectly steer Basic/Standard users away from the feature.
├── token / scope-map # Repository-scoped tokens (Premium)
skills/azure-container-registry-cli/references/networking-and-geo.md:139
- The import-pipeline command also requires
--storage-access-mode. Since this path uses--secret-uri, specifySasToken; otherwise currentacrtransferrejects the command before creating the pipeline.
az acr import-pipeline create --resource-group {rg} --registry {dst-registry} \
--name import-pipe \
--secret-uri https://{vault}.vault.azure.net/secrets/{sas-secret} \
--storage-container-uri https://{account}.blob.core.windows.net/{container}
skills/azure-container-registry-cli/references/images-and-artifacts.md:170
show-usageis not necessarily the actual total billable storage: Azure documents that it can lag recent operations, and for geo-replicated registries it reports only the home region. Note those limitations so this section does not understate storage costs.
Layers are deduplicated and shared across repositories; `show-usage` reports actual billable storage.
skills/azure-container-registry-cli/SKILL.md:32
az acr logindefaults to the Docker client and does not auto-detect Podman, so the advertised Podman quick start fails when Docker is absent. Include the requiredDOCKER_COMMAND=podmaninvocation.
# Authenticate Docker/Podman against the registry
az acr login --name {registry}
skills/azure-container-registry-cli/references/auth-and-security.md:19
- This command only authenticates Docker by default; Podman requires
DOCKER_COMMAND=podman. Without documenting that override, Podman-only environments receive a missing-Docker error.
# Standard login — wires Docker/Podman credentials via your az login identity
az acr login --name {registry}
skills/azure-container-registry-cli/references/networking-and-geo.md:133
acrtransfer2.0 made--storage-access-moderequired. Because this example supplies a Key Vault SAS secret, omitting--storage-access-mode SasTokenmakes the export-pipeline command fail argument validation.
This issue also appears on line 136 of the same file.
az acr export-pipeline create --resource-group {rg} --registry {src-registry} \
--name export-pipe \
--secret-uri https://{vault}.vault.azure.net/secrets/{sas-secret} \
--storage-container-uri https://{account}.blob.core.windows.net/{container}
skills/azure-container-registry-cli/references/images-and-artifacts.md:166
- The 10/100/500 GiB figures are included-pricing allowances, not the maximum SKU limits returned by
show-usage; storage can exceed them with overage charges. Calling them the quota misstates what the command's limit column represents.
This issue also appears on line 170 of the same file.
# Consumed storage vs SKU quota (Basic 10 GB / Standard 100 GB / Premium 500 GB included)
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
skills/azure-container-registry-cli/SKILL.md:70
- Repository-scoped tokens and scope maps are available in Basic, Standard, and Premium. Marking this command group as Premium-only contradicts line 53 and the authentication reference, and may wrongly steer Basic/Standard users away from the feature.
├── token / scope-map # Repository-scoped tokens (Premium)
skills/azure-container-registry-cli/references/images-and-artifacts.md:139
- This sequence cannot restore an artifact:
repository list-deletedonly lists deleted repositories, andmanifest restorerequires the deleted manifest digest. List deleted manifests for the repository so the digest is available, then pass it to the restore command.
az acr repository list-deleted --name {registry}
az acr manifest restore --registry {registry} --name app:v1
Pull Request Checklist
npm startand verified thatREADME.mdis up to date.mainbranch for this pull request.Description
Adds a new azure-container-registry-cli skill for managing Azure Container Registry via the
az acrCLI, modeled on the existingazure-devops-cliskill (compactSKILL.md+ progressive-disclosure reference files).The skill covers:
SKILL.md— prerequisites, quick start, key principles (preferaz acr build/az acr importover local docker workflows, keep the admin user disabled in production, Premium-only feature awareness) and theaz acrCLI structure, with a routing table to the reference files.references/auth-and-security.md—az acr login(incl.--expose-token), Entra RBAC roles (AcrPull/AcrPush/…), service principals, managed identities, AKS--attach-acr, repository-scoped tokens & scope maps, admin user rotation, content trust.references/build-and-tasks.md—az acr build,az acr run, multi-step task YAML, ACR Tasks with commit/base-image/timer triggers, task logs and identities, agent pools.references/images-and-artifacts.md—az acr import, repository/manifest management, untag vs delete pitfall,acr purgewith dry-run, image locking, retention policy & soft delete, artifact cache (pull-through), storage usage.references/networking-and-geo.md— geo-replication, zone redundancy, private endpoints + private DNS, network rules, dedicated data endpoints, connected registries, registry transfer pipelines.npm run skill:validatepasses (393 skills valid) and the generated skills table indocs/README.skills.mdis included in this PR.Type of Contribution
Additional Notes
Fills a gap: the repository has ~10 Azure instruction/skill assets (DevOps CLI, Bicep/Terraform AVM, Functions, naming) but nothing dedicated to Azure Container Registry, and
az acronly appears incidentally in two unrelated skill references.By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.