Remove old docker images from Azure Container Registry

As part of the Continuous Integration process, new builds are generated which contains certain enhancements or modification or bugfixes. For a containerized application deployment, docker images are created as part of builds which then needs to be uploaded to one of the container registries. Over the time, the registry will get filled up. Also as one use more and more space on the container registry, one needs to pay more and more.

There are no inbuilt commands or utilities provided by Docker for this. You have to write complex scripts for doing it. Fortunately, in latest round of the Azure CLI update, Microsoft has added some commands to do this. However, it can be cumbersome to select and remove docker images one at a time.  Continue reading “Remove old docker images from Azure Container Registry”

Install Azure CLI 2.0 on Ubuntu

Azure CLI or Azure command line interface is a cross platform command line tool offered by Microsoft to work with Microsoft Azure and manage azure resources. One can use it in the browser (in the azure cloud shell) or it can also be installed or major Operating Systems of one’s choice. Azure CLI 2.0 is optimized for managing and administering Azure resources from the command line, and for building automation scripts that work against the Azure Resource Manager.

Do note that azure is the prefix for old CLI – Azure CLI (i.e. version 1.0) , and that az is the prefix for the new CLI – Azure CLI 2.0.

In this blog post, we’ll learn how to install Azure CLI 2.0 on Ubuntu machine.
Continue reading “Install Azure CLI 2.0 on Ubuntu”

Delete an storage account containing an leased blob

Yesterday, I provisioned a couple of Azure VMs and provisioned them in a new storage account. In the end, I deleted the virtual machines and associated images and then tried to delete the newly created storage account. However the request to delete the storage account failed.

On the classic portal, https://manage.windowsazure.com, nothing happened when clicking delete button. On the new resource manager portal, https://portal.azure.com, when I delete the storage account, I got this error:

Failed to delete storage account 'ddportalvhdss3zc5vtxqstw'. Unable to delete 
storage account 'ddportalvhdss3zc5vtxqstw': 'Storage account 
ddportalvhdss3zc5vtxqstw contains VM Images. 
Ensure these VM Images are removed before deleting this storage account.'.

Trying to delete the blob itself …Continue Reading