-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
(steps 3 and 4 have been done already for eShopOnWeb, but are included so you see how you would add support to your own projects)
-
Right click on the
Web
project in VS for Mac 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) -
Run the project with
Run
>Start Debugging
from 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