Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

04. Deploying as a Linux Container into Azure App Service

Steve Smith edited this page Aug 15, 2017 · 4 revisions

To deploy the eShopOnWeb sample to a Linux Docker container on Azure App Services from Visual Studio 2017, follow these step-by-step instructions:

  1. Clone or download the eShopOnWeb sample to a folder on your local machine.

  2. Ensure that you have installed a recent version of Docker for Windows. You do not need to run Docker containers locally but you will need Docker command line tools to build the image.

  3. Right click on the Web project in Visual Studio and select the Add menu then Docker Support

Add docker support by clicking Add > Docker Support.

  1. Select Linux and click on OK. This will create a new project in your solution called docker-compose. This project contains the settings for deploying to Docker.

Select Linux in the Docker Support Options dialog

  1. Update the Program.cs to listen to port 80 rather than port 5106. Change the line
.UseUrls("http://0.0.0.0:5106")

to

.UseUrls("http://0.0.0.0:80")
  1. Right click on the Web project and select publish

Select publish

  1. In the publish dialog select Azure App Service Linux

Select Azure App Service Linux

  1. Fill in the fields in the App Services Dialog.
  • App Name - Name off the app service - this will be used in the default URL
  • Subscription - Select the Azure subscription to use
  • Resource Group - Select a resource group to use for all newly created services. You can either use an existing one or create a new one.
  • App Services Plan - The name of the app services plan to use. This can be an existing App Service or a new one
  • Container Registry - The instance of Azure Container Registry to use to hold the images to deploy. This can be an existing registry or a new one.
  1. Click Create to provision the resources on Azure.

Select Azure App Service Linux

  1. Once the deployment is complete a browser will open with the newly containerized application running on a Linux App Service

eShopOnline running on an Azure App Service

Clone this wiki locally