This repository has been archived by the owner on May 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
03a. Running Locally on a Linux Container from Visual Studio
Steve Smith edited this page Sep 12, 2019
·
1 revision
To deploy the eShopOnWeb sample to a local Linux Docker container, 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
-
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.
- Open the
docker-compose.override.yml
from thedocker-compose
project and change the line that reads80
to read5106
. This is the port eShopOnWeb is configured to run on. (See theProgram.cs
file for details)
-
Press
F5
to run the project or selectDebug
>Start Debugging
from the menu. -
Your default browser will start on a random port on localhost which is forwarded to the docker container.
You may encounter an error if your Docker for Windows is configured to run Windows containers. This setting change be changed by right clicking on the tray icon and selecting Switch to Linux containers
- Getting Started for Beginners (with video)
-
Walkthroughs
- Deploying to Azure App Service from Visual Studio
- Deploying to Azure App Service from Azure Portal
- Deploying to Azure App Service from Visual Studio for Mac
- Running as a Linux Container locally in Visual Studio
- Deploying as a Linux Container into Azure App Service
- Running in a Windows Container locally in Visual Studio
- Running as a Linux Container locally in Visual Studio for Mac
- Deploying as a Windows Container into a Windows Container host in Azure
- Working with the Project and Adding New Features using Visual Studio for Mac