Continuous Delivery to Microsoft Azure with Docker

Written by: James van den Berg

2 min read

Stay connected

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:

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:

With the command azure login, you will start the login process:

Copy the URL https://aka.ms/devicelogin in your browser:

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

Log in with your Microsoft Azure account:

Done!

The Microsoft Docker container with the latest Azure CLI is now connected with your Azure subscription:

From here you, can do continuous delivery to Microsoft Azure with Docker and #Code:

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

Here you see my Container01 in JamesTestLAB in Azure:

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

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

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.

Stay up to date

We'll never share your email address and you can opt out at any time, we promise.

Loading form...
Your ad blocker may be blocking functionality on this page. Please disable for an improved experience.