You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/container-registry/container-registry-retention-policy.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,15 +7,13 @@ manager: gwallace
7
7
8
8
ms.service: container-registry
9
9
ms.topic: article
10
-
ms.date: 09/23/2019
10
+
ms.date: 09/25/2019
11
11
ms.author: danlep
12
12
---
13
13
14
14
# Set a retention policy for untagged manifests
15
15
16
-
Azure Container Registry gives you the option to set a *retention policy* for stored image manifests that don't have any associated tags (*untagged manifests*). When a retention policy is enabled, untagged manifests in the registry are automatically deleted after a number of days you set. This feature prevents the registry from filling up with artifacts that aren't needed and helps you save on storage costs.
17
-
18
-
For background on container images and manifests, see [About registries, repositories, and images](container-registry-concepts.md).
16
+
Azure Container Registry gives you the option to set a *retention policy* for stored image manifests that don't have any associated tags (*untagged manifests*). When a retention policy is enabled, untagged manifests in the registry are automatically deleted after a number of days you set. This feature prevents the registry from filling up with artifacts that aren't needed and helps you save on storage costs. If the `delete-enabled` attribute of an untagged manifest is set to `false`, the manifest can't be deleted, and the retention policy doesn't apply.
19
17
20
18
You can use the Azure Cloud Shell or a local installation of the Azure CLI to run the command examples in this article. If you'd like to use it locally, version 2.0.74 or later is required. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][azure-cli].
21
19
@@ -40,8 +38,6 @@ The following example shows you how to use the Azure CLI to set a retention poli
40
38
41
39
By default, no retention policy is set in a container registry. To set or update a retention policy, run the [az acr config retention update][az-acr-config-retention-update] command in the Azure CLI. You can specify a number of days between 0 and 365 to retain the untagged manifests. If you don't specify a number of days, the command sets a default of 7 days. After the retention period, all untagged manifests in the registry are automatically deleted.
42
40
43
-
The retention policy doesn't apply to any untagged manifest that has the `delete-enabled` attribute set to `false`, or the `write-enabled` attribute set to `true`. For information about locked images and manifests, see [Lock a container image in an Azure container registry](container-registry-image-lock.md).
44
-
45
41
The following example sets a retention policy of 30 days for untagged manifests in the registry *myregistry*:
46
42
47
43
```azurecli
@@ -91,6 +87,8 @@ You can also set a registry's retention policy in the [Azure portal](https://por
91
87
92
88
* Learn how to [automatically purge](container-registry-auto-purge.md) selected images and manifests from a registry
93
89
90
+
* Learn more about options to [lock images and manifests](container-registry-image-lock.md) in a registry
0 commit comments