Skip to content

Commit 8ae7f02

Browse files
committed
update acr purge command samples
1 parent 5c87e6d commit 8ae7f02

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

articles/container-registry/container-registry-auto-purge.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.date: 05/07/2021
99

1010
When you use an Azure container registry as part of a development workflow, the registry can quickly fill up with images or other artifacts that aren't needed after a short period. You might want to delete all tags that are older than a certain duration or match a specified name filter. To delete multiple artifacts quickly, this article introduces the `acr purge` command you can run as an on-demand or [scheduled](container-registry-tasks-scheduled.md) ACR Task.
1111

12-
The `acr purge` command is currently distributed in a public container image (`mcr.microsoft.com/acr/acr-cli:0.4`), built from source code in the [acr-cli](https://github.com/Azure/acr-cli) repo in GitHub. `acr purge` is currently in preview.
12+
The `acr purge` command is currently distributed in a public container image (`mcr.microsoft.com/acr/acr-cli:0.5`), built from source code in the [acr-cli](https://github.com/Azure/acr-cli) repo in GitHub. `acr purge` is currently in preview.
1313

1414
You can use the Azure Cloud Shell or a local installation of the Azure CLI to run the ACR task examples in this article. If you'd like to use it locally, version 2.0.76 or later is required. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][azure-cli-install].
1515

@@ -29,7 +29,7 @@ The `acr purge` container command deletes images by tag in a repository that mat
2929

3030
At a minimum, specify the following when you run `acr purge`:
3131

32-
* `--filter` - A repository and a *regular expression* to filter tags in the repository. Examples: `--filter "hello-world:.*"` matches all tags in the `hello-world` repository, and `--filter "hello-world:^1.*"` matches tags beginning with `1`. Pass multiple `--filter` parameters to purge multiple repositories.
32+
* `--filter` - A repository name *regular expression* and a tag name *regular expression* to filter images in the registry. Examples: `--filter "hello-world:.*"` matches all tags in the `hello-world` repository, `--filter "hello-world:^1.*"` matches tags beginning with `1` in the `hello-world` repository, and `--filter ".*/cache:.*"` matches all tags in the repositories ending in `/cache`. You can also pass multiple `--filter` parameters.
3333
* `--ago` - A Go-style [duration string](https://go.dev/pkg/time/) to indicate a duration beyond which images are deleted. The duration consists of a sequence of one or more decimal numbers, each with a unit suffix. Valid time units include "d" for days, "h" for hours, and "m" for minutes. For example, `--ago 2d3h6m` selects all filtered images last modified more than 2 days, 3 hours, and 6 minutes ago, and `--ago 1.5h` selects images last modified more than 1.5 hours ago.
3434

3535
`acr purge` supports several optional parameters. The following two are used in examples in this article:

articles/container-registry/container-registry-tasks-reference-yaml.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -573,10 +573,10 @@ Each of the following aliases points to a stable image in Microsoft Container Re
573573

574574
| Alias | Image |
575575
| ----- | ----- |
576-
| `acr` | `mcr.microsoft.com/acr/acr-cli:0.4` |
577-
| `az` | `mcr.microsoft.com/acr/azure-cli:f75cfff` |
578-
| `bash` | `mcr.microsoft.com/acr/bash:f75cfff` |
579-
| `curl` | `mcr.microsoft.com/acr/curl:f75cfff` |
576+
| `acr` | `mcr.microsoft.com/acr/acr-cli:0.5` |
577+
| `az` | `mcr.microsoft.com/acr/azure-cli:7ee1d7f` |
578+
| `bash` | `mcr.microsoft.com/acr/bash:7ee1d7f` |
579+
| `curl` | `mcr.microsoft.com/acr/curl:7ee1d7f` |
580580

581581
The following example task uses several aliases to [purge](container-registry-auto-purge.md) image tags older than 7 days in the repo `samples/hello-world` in the run registry:
582582

0 commit comments

Comments
 (0)