I have two questions regarding ACR image pulling.
- Is there a possibility to get the pull count of an ACR docker image?
- Can we get the details of docker images that are not pulled for a specific time period? For example, the images that are not pulled for the last 7 days?
As I have mentioned above in the comments, You can achieve this by enabling the diagnostic settings on the container registry & passing those logs to log analytics workspace. you can write some custom kusto
queries & pull the logs based on your requirement.
The below query can help in getting the pull count of an image from acr over a period of time.
ContainerRegistryRepositoryEvents| where ArtifactType contains "acr.docker"
|where Repository contains "<repoName>" and Tag contains "<TagName>"
| where OperationName contains "Pull"
| where TimeGenerated > ago(24h)
| count
You can refer this documentation for more sample Kusto queries.