-
Notifications
You must be signed in to change notification settings - Fork 51
04. Deploying as a Linux Container into Azure App Service
To deploy the eShopOnWeb sample to a Linux Docker container on Azure App Services from Visual Studio, follow these step-by-step instructions:
-
Clone or download the eShopOnWeb sample to a folder on your local machine.
-
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.
-
Right click on the
Web
project in Visual Studio and select theAdd
menu thenDocker Support
. -
Select
Linux
and click onOK
. This will create a new project in your solution calleddocker-compose
. This project contains the settings for deploying to Docker. -
Update the
docker-compose.yml
to listen to and forward port 80 to port 5106. Change the lineports: - "80"
to
ports: - "80:5106"
-
Right click on the
Web
project and selectPublish
-
In the
Publish
dialog selectAzure App Service Linux
-
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.
-
-
Click
Create
to provision the resources on Azure. -
Once the deployment is complete a browser will open with the newly containerized application running on a Linux App Service.