Azure Container Registry CLI

Azure Container Registry CLI

Guides an agent through managing Azure Container Registry with the az acr CLI: registries, images, cloud builds, tasks, tokens, geo-replication and networking.

Skill files5 files

references/

SKILL.md91 lines
1
---
2
name: azure-container-registry-cli
3
description: 'Manage Azure Container Registry via the az acr CLI including registries, images, cloud builds, ACR Tasks, authentication, tokens, geo-replication, and networking. Use when working with ACR, az acr commands, pushing/importing/purging container images in Azure, or when the user mentions Azure Container Registry.'
4
---
5
6
# Azure Container Registry CLI
7
8
Manage Azure Container Registry (ACR) resources using the `az acr` command group of the Azure CLI.
9
10
**CLI:** `az acr` ships with core Azure CLI — no extension required (the `acrtransfer` extension is only needed for export/import pipelines).
11
12
## Prerequisites
13
14
```bash
15
# Install Azure CLI
16
brew install azure-cli # macOS
17
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash # Linux
18
winget install Microsoft.AzureCLI # Windows
19
20
# Sign in and select subscription
21
az login
22
az account set --subscription {subscription-id}
23
```
24
25
## Quick Start
26
27
```bash
28
# Create a registry (SKU: Basic | Standard | Premium)
29
az acr create --resource-group {rg} --name {registry} --sku Standard
30
31
# Authenticate Docker/Podman against the registry
32
az acr login --name {registry}
33
34
# Build and push in the cloud — no local Docker needed
35
az acr build --registry {registry} --image app:v1 .
36
37
# Copy an image from another registry without pull/push
38
az acr import --name {registry} --source mcr.microsoft.com/hello-world:latest
39
40
# List repositories and tags
41
az acr repository list --name {registry} --output table
42
az acr repository show-tags --name {registry} --repository app --orderby time_desc
43
44
# Diagnose registry connectivity and configuration
45
az acr check-health --name {registry} --yes
46
```
47
48
## Key Principles
49
50
- **Prefer `az acr build` / ACR Tasks** over local `docker build` + `docker push`: builds run in Azure, work without a local daemon, and integrate with triggers.
51
- **Prefer `az acr import`** to move images between registries: it is server-side, faster, and requires no local storage.
52
- **Never enable the admin user for production** — use Microsoft Entra identities (RBAC roles `AcrPull`/`AcrPush`, or `Container Registry Repository Reader`/`Writer` on ABAC-enabled registries), repository-scoped tokens, or managed identities.
53
- **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.)
54
55
## CLI Structure
56
57
```
58
az acr
59
├── create / delete / list / show / update # Registry lifecycle
60
├── login # Docker credential helper (or --expose-token)
61
├── check-health / check-name / show-usage # Diagnostics & quota
62
├── build # Cloud image build (quick task)
63
├── run # Run a command / multi-step task once
64
├── task # ACR Tasks (triggers, timers, logs, runs)
65
├── agentpool # Dedicated task agent pools (Premium)
66
├── import # Server-side image copy into the registry
67
├── repository # List/show/delete/untag repos & tags, lock images
68
├── manifest # Manifest metadata, delete, OCI referrers
69
├── credential # Admin user credentials (avoid in production)
70
├── token / scope-map # Repository-scoped tokens (Premium)
71
├── replication # Geo-replication (Premium)
72
├── network-rule # IP network rules
73
├── private-endpoint-connection # Private Link approvals
74
├── config # content-trust, retention, soft-delete, ...
75
├── cache / credential-set # Artifact cache (pull-through cache) rules
76
├── webhook # Push/delete event webhooks
77
├── connected-registry # On-premises / IoT connected registries
78
└── export-pipeline / import-pipeline / pipeline-run # acrtransfer extension
79
```
80
81
## Reference Files
82
83
Read the relevant reference file based on the user's task. Each file contains complete command syntax and examples for its domain.
84
85
| File | When to read | Covers |
86
|---|---|---|
87
| `references/auth-and-security.md` | Login failures, permissions, CI/CD or AKS pull access | `az acr login` (incl. `--expose-token`), Entra RBAC roles, service principals, managed identities, `--attach-acr` for AKS, repository-scoped tokens & scope maps, admin user, content trust |
88
| `references/build-and-tasks.md` | Building images in Azure, automation, CI triggers | `az acr build`, `az acr run`, multi-step task YAML, `az acr task` (git/base-image/timer triggers, logs, runs), agent pools |
89
| `references/images-and-artifacts.md` | Managing repos, tags, cleanup, storage costs | `az acr import`, repository & manifest commands, untag vs delete, purge (`acr purge`), image locking, retention policy, soft delete, artifact cache, `show-usage` |
90
| `references/networking-and-geo.md` | Multi-region, private access, edge scenarios | Geo-replication, zone redundancy, private endpoints, network rules, dedicated data endpoints, connected registries, registry transfer pipelines |
91

© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…