acr icon indicating copy to clipboard operation
acr copied to clipboard

Cache Azure Container Registry Repositories

Open JXavierMSFT opened this issue 1 year ago • 7 comments

Caching for ACR will soon allow users to cache repositories from other Azure Container Registries. This functionality is tentatively scheduled for release in late December 2023.

JXavierMSFT avatar Apr 12 '23 22:04 JXavierMSFT

here is one more use case, where limit of 50 rules won't work

problem: it may be hard to safely cleanup container registry, and in some cases registries are filled up quickly with tens of terabytes of images

idea:

imagine following setup:

  • we have main.azurecr.io where each and every image published, it has quadrillion of images and weights tens of terabytes, it is hard to clean it up
  • we have cache.azurecr.io side by side, configured as read only cache proxy against main.azurecr.io, all our Kubernetes clusters and other docker related services are talking to it

as result:

  • it should be safe to remove images older than X months from main.azurecr.io
  • it is still hard to cleanup cache.azurecr.io but it will be much smaller, because it holds only images used at least once
  • cache.azurecr.io may be used to bypass limits from docker, quaye, etc.

why:

while playing with Azure Container Registry and connecting it, it took only 2 days to fill 50gb of data

image

when:

seems like limit of 50 rules is real blocker here, as a workaround we probably may have many registries, but it is error prone

alternative: of course, it will be much better to have idempotent builds and image tagging strategy that will override labels, but that's not always suitable

mac2000 avatar Jul 12 '23 06:07 mac2000

It is annoying that you need to define a cache-rule for each and every repo - having a wildcard like docker.io/* mapping over to a prefix of docker.io/ within ACR would scale a lot better.

davidkarlsen avatar Sep 16 '23 11:09 davidkarlsen

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Nov 16 '23 01:11 github-actions[bot]

@JXavierMSFT do we have any updates on prefix matching.

sajayantony avatar Nov 16 '23 16:11 sajayantony

We have released Wildcard cache rules. You can check the docs at aka.ms/acr/cache. However, we haven't released Azure Container Registry as an upstream yet. I will update this thread as soon as we release.

JXavierMSFT avatar Nov 16 '23 17:11 JXavierMSFT

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Jan 16 '24 01:01 github-actions[bot]

@JXavierMSFT anything new for caching ACR?

floriankoch avatar Feb 06 '24 18:02 floriankoch