dotnet / dotnet/docker-tools

ACR cleanup is pruning mirrored images that we want to be keeping

Open
#797 1 comment 0 reactions 0 assignees View on GitHub
area-infrastructure
Dominant language
C#
Stars
181
Forks
67
Avg merge
2d 15h
Merged PRs (30d)
10

Description

The ACR cleanup pipeline is [configured](https://github.com/dotnet/docker-tools/blob/7d5c35e09f19bd7b3b333aa7065c0d0d9e4bd9e3/eng/pipelines/cleanup-acr-images.yml#L41-L45) to prune dangling images in the `mirror` repo.

The problem is that many of the mirrored tags are multi-arch tags because that is what the Dockerfile references. For example, we mirror the `library/centos:7` tag which is multi-arch. The act of mirroring that tag also automatically mirrors all of the underlying image digests associated with that multi-arch manifest digest (ACR does this for us). But then the ACR cleanup pipeline will delete those underlying image digests because those digests do not have any corresponding tags, only the multi-arch manifest digest has a tag. So it's this continuous cycle of deleting each night and then re-mirroring on the next build.

The consequence of this is that it defeats one of the purposes of mirroring. If the registry that we get the tag from (Docker Hub or otherwise) is down during that first build that runs after cleanup, we won't be able to mirror the images and be unable to run the build.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.