Create an Azure Container Registry and publish a docker image

Microsoft has just released Azure Container Registry preview at Connect(). It is a private Docker container registry service like Docker Hub, GCR, and AWS ECR. I have a test run of ACR.

Creating an Azure container registry

As usual, I sign in to the Azure Portal to add a new object. Here is the information I use to create the registry. Please note that I forgot to enable Admin User during creation. So I would need to change the registry settings later.

screen_shot_2016-11-19_at_5_16_56_pm

After the registry is created, I open the container registry overview.

screen_shot_2016-11-19_at_5_31_09_pm

Please note that the registry settings are actually under “Access Key“, which is an odd language choice – still in preview. I could enable the “Admin user” option in Access Key.

screen_shot_2016-11-19_at_5_39_42_pm

The ACR is then usable. Here is the important information one could use for the Docker images:

  1. Logon server — This is my private Docker registry.
  2. Username and password — These are for docker login command.

Push a Docker image to ACR

I have an image built for Alpine version of NGINX Docker image with libressl and luajit.

screen_shot_2016-11-19_at_5_44_19_pm

Please note that I have the image built already. However, I still need to tag the image to use my ACR.

screen-shot-2016-11-19-at-5-48-35-pm

Now log in to my private ACR with docker login.

screen-shot-2016-11-19-at-5-53-42-pm

Then push the Docker image.

screen-shot-2016-11-19-at-5-54-07-pm

Viola! Now I have the Docker image available in my private ACR. I can pull the image from ACR easily.

screen-shot-2016-11-19-at-6-05-55-pm

Published by Felix Huang

felix the cat, coder, tinkerer