From d5042abc0f97ace196ea001a54ba3de105035c46 Mon Sep 17 00:00:00 2001 From: RamonTC Date: Fri, 25 Aug 2017 15:24:09 +0200 Subject: [PATCH] Updated 04. Setting eShopOnContainer solution up in a Mac, VS Code and CLI environment (dotnet CLI, Docker CLI and VS Code) (markdown) --- ...t--(dotnet-CLI,-Docker-CLI-and-VS-Code).md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/04.-Setting-eShopOnContainer-solution-up-in-a-Mac,-VS-Code-and-CLI-environment--(dotnet-CLI,-Docker-CLI-and-VS-Code).md b/04.-Setting-eShopOnContainer-solution-up-in-a-Mac,-VS-Code-and-CLI-environment--(dotnet-CLI,-Docker-CLI-and-VS-Code).md index 0f3178e..650378b 100644 --- a/04.-Setting-eShopOnContainer-solution-up-in-a-Mac,-VS-Code-and-CLI-environment--(dotnet-CLI,-Docker-CLI-and-VS-Code).md +++ b/04.-Setting-eShopOnContainer-solution-up-in-a-Mac,-VS-Code-and-CLI-environment--(dotnet-CLI,-Docker-CLI-and-VS-Code).md @@ -88,6 +88,34 @@ build image which includes the .NET SDK, NPM and many other Web and ASP.NET depe Contrast the four commands you ran above, along with the minimal prerequisites, with the list of prerequisites and tools needed to build locally on your machine. +## Setting up docker-compose file + +The Mac has a changing IP address (or none if you have no network access). From 17.06 onwards our recommendation is to connect to the special Mac-only DNS name docker.for.mac.localhost which will resolve to the internal IP address used by the host. + +Therefore, the following change must be done in docker-compose.override.yml. +In the WebMVC service section, replace the IdentityUrl environment variable with: + + ```bash + IdentityUrl=http://docker.for.mac.localhost:5105 + ``` +The WebMVC service definition should finally be configured as shown bellow: + + ```bash + webmvc: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:80 + - CatalogUrl=http://catalog.api + - OrderingUrl=http://ordering.api + - BasketUrl=http://basket.api + - IdentityUrl=http://docker.for.mac.localhost:5105 + - MarketingUrl=http://marketing.api #Local: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser. + #Remote: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser. + - UseCustomizationData=True + ports: + - "5100:80" + ``` + ## Building the application locally You can build the application using your machien, if you prefer. You'll need the following @@ -96,6 +124,11 @@ prerequisites installed, in addition to those listed above for building using th - *[.NET Core and SDK](http://dot.net)* - *[Node and NPM](http://nodejs.org)* +Install the following software versions: + + - .NET Core 1.1 (1.1.2 with SDK 1.0.4 (Promoted to LTS)) https://github.com/dotnet/core/blob/master/release-notes/download-archives/1.1.2-download.md + - NodeJS 6.11.1 + We've included a bash script that runs all the build commands locally. Navigate to your eShopOnContainers directory, and cd into the *cli-mac* directory. Then, run the build script: