title: Azure Container Registry - List Images / Tags - Programmatically
body: <p>I'm bashing my head against the wall to try and figure out how to programmatically get a list of images in an Azure Container Registry.</p>
  
  <p>Everything seems to fall down to looking in Docker.DotNet's own <em>local</em> instantiation of an image list, and push/pulling to an ACR via that local repository - but nothing is showing me how to get a list of images (and their tags) from the ACR itself.      In digging through their rest API for azure, it looks like only a slim set of "management" options are available (getting a list of ACRs, getting the properties of an ACR, but nothing shows me it dives deeper than that).</p>
  
  <p>I can get a list of image names, and then their image name tags via the Azure CLI -- <strong>but</strong> I'm looking to get an enumerable list of images in a C# app (inside a web-api, matter of fact).</p>
  
  <p>Essentially - what I want to do is have a list of running images remotely, in docker -- and compare <em>those</em> to what's up in the ACR, to give a "hey, there's a newer version of this image available".</p>
  
  <p>Has anyone done this?   To any effect?</p>
  
  <p>Is it simple like this (for Docker):</p>
  
  <pre><code>    var _credentials = new BasicAuthCredentials("MY_REG_USERNAME", "MY_REG_PASSWORD");
      var _config = new DockerClientConfiguration(new Uri("MY_REGISTRY_NAME.azurecr.io"), _credentials);
      DockerClient _client = _config.CreateClient();
  
      var myList = await _client.Images.ListImagesAsync(
               new Docker.DotNet.Models.ImagesListParameters() { All = true }
       );
  </code></pre>
  
  <p>or impossible?   </p>
  
  <p>I've messed around with IoT hubs and getting device twin lists and the like, with the DeviceClient -- is there nothing like this for the ACR?</p>