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

03b. Running Locally on a Linux Container from Visual Studio for Mac

Eric Fleming edited this page Oct 21, 2019 · 4 revisions

To deploy the eShopOnWeb sample to a local Linux Docker container, from Visual Studio for Mac, 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 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)

  1. Right click on the Web project in VS for Mac and select the Add menu then Docker Support.

  2. 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.

  3. Open the docker-compose.override.yml from the docker-compose project and change the line that reads 80 to read 5106. This is the port eShopOnWeb is configured to run on. (See the Program.cs file for details)

  4. Run the project with Run > Start Debugging from the menu.

  5. Your default browser will start on a random port on localhost which is forwarded to the docker container.

Troubleshooting

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.

Clone this wiki locally