All Products
Search
Document Center

Container Registry:Enable image version immutability

Last Updated:Mar 26, 2026

When you deploy container images to production, you need to ensure that a tagged image cannot be silently replaced by a later push. Image tag immutability prevents any existing tag from being overwritten: if a push targets an existing tag, ACR rejects it with the error The requested tag already exists and cannot be overwritten.

Image tag immutability is configured per repository. The latest tag is exempt and can still be overwritten even when immutability is enabled.

Prerequisites

Before you begin, ensure that you have:

  • An ACR Enterprise Edition instance

  • A repository in that instance

Enable image tag immutability

  1. Log on to the Container Registry console.

  2. In the top navigation bar, select a region.

  3. In the left-side navigation pane, click Instances.

  4. On the Instances page, click the Enterprise Edition instance you want to manage.

  5. In the left-side navigation pane, choose Repository > Repositories.

  6. On the Repositories page, find the repository you want to configure and click Manage in the Actions column.

  7. On the repository details page, click Edit in the Details section.

  8. In the Modify Settings dialog box, select Immutable and click Confirm.

    Note

    To disable image tag immutability, clear Immutable.

Verify image tag immutability

  1. Push an image with a non-latest tag to the repository.

    docker push example-registry-vpc.cn-hangzhou.cr.aliyuncs.com/test/example:v1
  2. Push another image using the same tag.

    The push is rejected with the following error:

    The requested tag already exists and cannot be overwritten.
  3. Push an image with the latest tag.

    docker push example-registry-vpc.cn-hangzhou.cr.aliyuncs.com/test/example:latest
  4. Push another image using the latest tag.

    The push succeeds and the previous latest image is overwritten. This confirms that the latest tag is exempt from immutability.

  5. Clear the Immutable checkbox to disable image tag immutability.

  6. Push another image using the same non-latest tag as in step 1.

    The push succeeds and the image overwrites the previous one. This confirms that clearing Immutable restores normal push behavior.