-
Notifications
You must be signed in to change notification settings - Fork 5.9k
03b. Running Locally on a Linux Container from Visual Studio for Mac
To deploy the eShopOnWeb sample to a local Linux Docker container, from Visual Studio for Mac, 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 Mac
-
Right click on the
Webproject in VS for Mac and select theAddmenu thenDocker Support. (this step has already been done for you, but this is how you would add Docker to your own project) -
Select
Linuxand 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.ymlfrom thedocker-composeproject and change the line that reads80to read5106. This is the port eShopOnWeb is configured to run on. (See theProgram.csfile for details) -
Press
F5to run the project or selectDebug>Start Debuggingfrom the menu. -
Your default browser will start on a random port on localhost which is forwarded to the docker container.
The first time you run the application you may need to add a folder sharing path to Docker. Make sure you add the /usr/local/share/dotnet/sdk/NuGetFallbackFolder folder to Docker's file sharing options as detailed here.
- 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