Deploy to Azure using Docker

This tutorial walks you through containerizing an existing Node.js application using Docker, pushing the app image to a Docker registry, then deploying the image to Azure Web App for Containers directly from Visual Studio Code.

Prerequisites

If you don't have an Azure account, sign up today for a free 30-day account with $200 in Azure credits to try out any combination of services.

You need Visual Studio Code installed along with Node.js and npm and Docker.

Install the Docker and Azure App Service extensions

The Docker extension is used to simplify the management of local Docker images and commands as well as the deployment of a built app image to Azure.

Install the Docker extension

The Azure App Service extension is used to create, manage, and deploy Linux Web Apps on the Azure PaaS.

Install the Azure App Service extension

Sign in

Once the extension is installed, log into your Azure account - in the AZURE APP SERVICE explorer, click Sign in to Azure... and follow the instructions.

sign in to Azure

Prerequisite Check

Before we continue, ensure that you have all the prerequisites installed and configured.

In VS Code, you should see your Azure email address in the Status Bar and your subscription in the AZURE APP SERVICE explorer.

Verify that you have Docker installed and running.

$ docker --version
Docker Version 17.12.0-ce, build c97c6d6

I've installed the Docker Extension