Problem
I have a Docker Container registry on Azure with one container holding multiple tagged versions. I'd like to remove the unused tags as they're taking up a lot of space and can be remade at any time.
Reasons
The only reason this Docker container registry exists is because of how VSTS handles builds and releases of Docker containers. When running a VSTS build, it stores the container in the registry on Azure with a new tag. Not all builds will be released so those tags can be safely removed.
VSTS manages builds very cleanly and removes them if they're not in use after 30 days (by default); although, once pushed to the Docker container registry, they will stay there indefinitely even without a matching VSTS build.
Question
How would I create a task to remove Docker containers from the registry that are no longer associated with a build in VSTS?
NOTE: The container tags match VSTS's buildId
s