From 087f5d7c4e6a20f8813605c20576fc6e1f5cea8e Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Wed, 10 May 2017 11:02:29 -0400 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, 29 insertions(+), 4 deletions(-) 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 57f5fd3..09da28b 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 @@ -1,8 +1,33 @@ -TBD - Should be pretty similar to the Windows CLI dev environment, but from a Mac. -This page will be written in the near future. +## Want to try it out on the Mac using the bash shell? -In the meantime, see: -https://github.com/dotnet/eShopOnContainers/wiki/03.-Setting-the-eShopOnContainers-solution-up-in-a-Windows-CLI-environment-(dotnet-CLI,-Docker-CLI-and-VS-Code) +Main steps: +  +``` +$ git clone https://github.com/dotnet-architecture/eShopOnContainers.git +$ cd eShopOnContainers +$ docker-compose -f docker-compose.ci.build.yml up +$ docker-compose up +``` + +The first two commands clone the git repository onto your machine, and changes the current directory to the root directory of the project. + +The third command, `docker-compose -f docker-compose.ci.build.yml up` creates a Docker container based on an image used for Continuous Integration (CI) builds. That image has all the required SDKs and tools loaded on it. These include .NET Core, the .NET Core CLI and SDK, npm, and required npm packages. Once the container starts, it will mount your source directory as a shared drive, then build and publish all the projects that make up the eShopOnContainers application. + +The final command `docker-compose up` pulls all the base Docker images needed, creates the images for each microservice, then launches each container that makes up the application. + +Once the containers have launched, open a browser and navigate to `http://localhost:5100` to visit the MVC application: + + + +-------------------------------------------------------------------- +-------------------------------------------------------------------- +## Detailed procedure - Setting eShopOnContainers up in a CLI and Windows based development machine +This CLI environment means that you want to build/run by using the CLI (Command line interface) available in .NET Core (dotnetcore) and Docker CLI. +

+You don't need Visual Studio 2017 for this environment but can use any code editor like Visual Studio Code, Sublime, etc. Of course, you could still use VS 2017 at the same time, as well. + +### GitHub branch to use/pull +By default, use the MASTER branch which supports .CSPROJ projects and .NET Core 1.1 CLI and Docker CLI. The same branch's code supports Visual Studio 2017 or CLI scenarios, simultaneously, depending on each developer's preference. ## Sending feedback and pull requests