Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

04. Deploying as a Linux Container into Azure App Service

Steve Smith edited this page Jun 4, 2019 · 4 revisions

To deploy the eShopOnWeb sample to a Linux Docker container on Azure App Services from Visual Studio, 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 docker-compose.yml to listen to and forward port 80 to port 5106. Change the line
ports:
- "80"

to

ports:
- "80:5106"
  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