Azure “Cloud Shell” Docker QuickStart Tutorial

Welcome to the BoxBoat QuickStart guide to help get you started with Docker on Azure. Last week we published a Docker QuickStart guide to run NGINX in Docker in less than 5 minutes. If you haven’t read that, we highly recommend giving that a quick read.

Let’s get an Ubuntu Linux VM with Docker CE running an NGINX container up in Azure using ONLY their “Cloud Shell” feature! This guide assumes that you have a Microsoft Azure account already.

The first thing we need to do is…

Activate Cloud Shell

Launch Cloud Shell from the top right of the Azure Portal:

Select a subscription

Click “Create storage”

Cloud Shell will appear at the bottom of the Azure Portal:

Next we have to configure our VM to auto-update all packages, install and start Docker CE and allow the “azureuser” to run docker commands…

Create a VM cloud-init config file

First create a “cloud-init” directory to store the config file in your “clouddrive”:

Next, using either “vi” or “nano”, create a simple cloud-init config to setup our VM: