Register Now

Continuous Delivery to Microsoft Azure with Docker


Reading Time: 2 minutes

This article was originally published on James van den Berg’s personal site. With his kind permission, we’re sharing it here for Codeship readers.

To make it easy for you to deploy your application to Azure, we’ve built a container that has the AzureCLI installed. We will set up a simple example, showing you how to configure any deployment to Azure. If you don’t have Docker yet, you can get it here.


With the command docker pull microsoft/azure-cli, you get the latest container:


With the command docker run -it microsoft/azure-cli, you will start the container:


Now you have the latest Azure CLI in a Docker container: docker-azure-cli-3

From inside the Microsoft Docker container, we will make a connection to an Azure subscription. If you don’t have a Microsoft Azure subscription, you can get your free Azure trial subscription here.

My Microsoft Docker container is running: docker-azure-cli-4

With the command azure login, you will start the login process: docker-azure-cli-4b

Copy the URL in your browser: docker-azure-cli-5

Copy your code from the container login into the Device login, and click on Continue for Microsoft Azure cross-platform CLI login: docker-azure-cli-6

Log in with your Microsoft Azure account: docker-azure-cli-7

Done! docker-azure-cli-8

The Microsoft Docker container with the latest Azure CLI is now connected with your Azure subscription: docker-azure-cli-9

From here you, can do continuous delivery to Microsoft Azure with Docker and #Code: azure-cli-in-a-docker-container

With the command azure lab, you see that I can manage my Azure Dev/Test LAB from my Docker container: azure-devtest-lab

Here you see my Container01 in JamesTestLAB in Azure: azure-container01

With the command azure vm start, we run the Azure Container01: container01-started

Now the Azure Container01 is running and started from a Microsoft Docker container with Azure CLI: azure-container01-running-now

Get started with Azure CLI 2.0 technical docs. Have a look at Codeship to make continuous delivery on Microsoft Azure Cloud easy on yourself.

Subscribe via Email

Over 60,000 people from companies like Netflix, Apple, Spotify and O'Reilly are reading our articles.
Subscribe to receive a weekly newsletter with articles around Continuous Integration, Docker, and software development best practices.

We promise that we won't spam you. You can unsubscribe any time.

Join the Discussion

Leave us some comments on what you think about this topic or if you like to add something.