How much does ACR (Azure Container Registry) cost?

Well, believe it or not, this Azure service has no free subscription. The ‘cheapest’ one is about $0.252/day with a total of 10 GiB of storage and 2 Webhooks. Unfortunately, with no support for Geo-replication.

As pricing can change over the time, this site should give you the most up-to-date details: https://azure.microsoft.com/en-us/pricing/details/container-registry/

_BASICSTANDARDPREMIUM
Price per day$0.252$1.008$2.520
Included storage (GiB)10100500
Premium offers enhanced throughput for docker pulls across multiple, concurrent nodes
Total webhooks210500
Geo-ReplicationNot SupportedNot SupportedSupported
$2.520 per replicated region
Azure Container Registry pricing

Do I like ACR?

Yes and no …

For big projects in size, where the biggest proportion of the solution services is getting provisioned in Azure – Yes, definitely. The level of convenience of having ‘everything’ (source code, tool-set, hosting environment, …) in one place plays a big role here. The assumption is that if Devs/DevOps are happy with the tool-set within the same platform, the overall progress on the project should be faster as there is no need for extra work for system integration and shaping diametrically different skills sets (theory but works in many cases).

And for the projects hungry for disk space and tight to budget – No. There are cheaper alternatives on the market, for example, Docker.com (with one private repository in the Free plan – whoop, whoop!). Pricing starts as low as USD $5/month (with an annual plan) which is insanely CHEAP! So if Azure is not your dime in solution, Docker.com would be my choice to pick.

More details about Docker pricing (and most updated) can be found here: https://www.docker.com/pricing

Docker pricing and subscriptions
Docker pricing and subscriptions

Thanks for staying, subscribe to my blog, and leave me a comment below.

cheers\

Committing and Pushing Docker image changes to Azure Container Registry

Docker image

If you made it this far, then you must know something about the Docker (Containerization). That is great because this post is not about what Docker really is but how to work with image revisions in conjunction with the Azure Container Registry (aka repo).

I am assuming you have your own repository in Azure created already and know the basic commands of how to spin up the container (or leave the comments below).

Also that a Docker desktop is installed on your PC and has a docker image ready to be used for this exercise.

User story

You as a developer want to create a starting (based) image out of the running container on your localhost (image type regardless of this exercise) for your co-workers. The image is going to be parked in ACR for easy access. The initial version is going to have the tag ‘v1’.

Steps to follow

1. Download MS Azure Command Prompt, the latest version can be found here, or just use google search


2. Validate that installation has been successful by starting the MS Azure Prompt and run

az --version
If you see this, then you did well!


3. Log in to Azure by using this command below (you should be redirected onto the browser app with portal.azure.com as URL. Now, use your user credentials and wait for a callback redirect back to the terminal (MS ACP)

az acr login --name <your ACR name> 

Example:

az acr login --name webcommerce22


4. Commit the latest changes on the top of the running docker container (docker desktop) with tag v1 (this operation creates a new image). Remember that only these characters are allowed in naming ‘a-z0-9-_.’

docker commit <docker container hash id> <repository URL>[/<new image name>][:<tag name>]

Example:

docker commit 2cbbb6f54f4b webcommerce22.azurecr.io/web-api-pricing:v1
The created new image out of the running container


5. Push the changes to ACR

docker push <repository URL>[/<image name>][:<tag id>]

Example:

docker push webcommerce22.azurecr.io/web-api-pricing:v1
Pushing image to Azure Container Registry
A new container repository is created with a v1 image in it


And here you are. Great way how to keep your changes over the container image revisioned.

For more details about the docker commands, I can recommend following this URL https://docs.docker.com/engine/reference/commandline/docker/

Thanks for staying, subscribe to my blog, and leave me a comment below.

cheers\