Updated 03. Setting the eShopOnContainers solution up in a Windows CLI environment (dotnet CLI, Docker CLI and VS Code) (markdown)
parent
90cad95942
commit
0af32b90fe
@ -60,20 +60,19 @@ Once Docker for Windows is installed in your machine, enter into its Settings an
|
|||||||
<img src="img/docker_settings.png">
|
<img src="img/docker_settings.png">
|
||||||
|
|
||||||
### Share drives in Docker settings
|
### Share drives in Docker settings
|
||||||
This is an important and required configuration step in order to build the bits from the build-container so it has access to the solution files.<p>
|
This step is optional but recommended, as Docker needs sometime to access the shared drives when building, depending on the actions.
|
||||||
You need to share the drives from Settings-> Shared Drives in the "Docker for Windows" configuration.
|
|
||||||
If you don't do this, you will get an error when trying to build from the container, like "Cannot create container for service your Application: C: drive is not shared". <p>
|
|
||||||
The drive you'll need to share depends on where you place your source code.
|
The drive you'll need to share depends on where you place your source code.
|
||||||
|
|
||||||
<img src="img/docker_settings_shared_drives.png">
|
<img src="img/docker_settings_shared_drives.png">
|
||||||
|
|
||||||
**NOTE**: If you are using **Windows 10 Creators Update** (Windows 10 Creators Update, version 1703, codenamed "Redstone 2") **and your machine is joined to a Windows or Azure Domain**, you might get some issues when configuring the share drives for Docker. Providing a local user credential (from your actual machine) instead of a Windows/Azure Domain user credential might solve the issue.
|
|
||||||
Check the following blog post for additional workarounds:
|
|
||||||
https://blogs.msdn.microsoft.com/stevelasker/2016/06/14/configuring-docker-for-windows-volumes/
|
|
||||||
|
|
||||||
### IMPORTANT: Open ports in local Firewall so Authentication to the STS (Security Token Service container) can be done through the 10.0.75.1 IP which should be available and already setup by Docker. Also needed for client remote apps like Xamarin app or SPA app in remote browser.
|
### IMPORTANT: Open ports in local Firewall so Authentication to the STS (Security Token Service container) can be done through the 10.0.75.1 IP which should be available and already setup by Docker. Also needed for client remote apps like Xamarin app or SPA app in remote browser.
|
||||||
|
|
||||||
- You can manually create a rule in your local firewall in your development machine or you can also create that rule by just executing the <b>add-firewall-rules-for-sts-auth-thru-docker.ps1</b> script available in the solution's **cli-windows** folder.
|
- You can manually create a rule in your local firewall in your development machine or you can also create that rule by just executing the <b>add-firewall-rules-for-sts-auth-thru-docker.ps1</b> script available in the solution's **cli-windows** folder.
|
||||||
|
|
||||||
- Basically, you need to open the ports 5100 to 5105 that are used by the solution by creating an IN-BOUND RULE in your firewall, as shown in the screenshot below (for Windows).
|
- Basically, you need to open the ports 5100 to 5105 that are used by the solution by creating an IN-BOUND RULE in your firewall, as shown in the screenshot below (for Windows).
|
||||||
|
|
||||||
<img src="img/firewall-rule-for-eshop.png">
|
<img src="img/firewall-rule-for-eshop.png">
|
||||||
|
|
||||||
## .NET Core SDK setup
|
## .NET Core SDK setup
|
||||||
@ -83,7 +82,10 @@ The .NET Core SDK install the .NET Core framework plus the SDK CLI tools with co
|
|||||||
Install the .NET Core SDK from here:
|
Install the .NET Core SDK from here:
|
||||||
https://www.microsoft.com/net/download/windows#/current
|
https://www.microsoft.com/net/download/windows#/current
|
||||||
|
|
||||||
## Install NPM
|
## Install NPM (Optional, this local installation is not required when using Docker Multi-Stage)
|
||||||
|
|
||||||
|
(OPTIONAL) As mentioned, this requirement is optional because when building through Docker Multi-Stage" it will be using the dependencies available within the ASP.NET Core build image, not the installed software on the local machine/PC.
|
||||||
|
|
||||||
In order to be able to build the JavaScript dependencies from command line by using npm you need to install npm globally.
|
In order to be able to build the JavaScript dependencies from command line by using npm you need to install npm globally.
|
||||||
|
|
||||||
NPM is bundled with NODE.JS. Installing NPM and NODE is pretty straightforward by using the installer package available at https://nodejs.org/en/
|
NPM is bundled with NODE.JS. Installing NPM and NODE is pretty straightforward by using the installer package available at https://nodejs.org/en/
|
||||||
@ -98,7 +100,10 @@ After installing Node, you can check the installed NPM version with the command
|
|||||||
<p>
|
<p>
|
||||||
<img src="img/spa/npm-versions-powershell.png">
|
<img src="img/spa/npm-versions-powershell.png">
|
||||||
|
|
||||||
## Install Bower
|
## Install Bower (Optional, this local installation is not required when using Docker Multi-Stage)
|
||||||
|
|
||||||
|
(OPTIONAL) As mentioned, this requirement is optional because when building through Docker Multi-Stage" it will be using the dependencies available within the ASP.NET Core build image, not the installed software on the local machine/PC.
|
||||||
|
|
||||||
Bower is needed by minor dependencies at the MVC web app. It using Visual Studio, VS will handle that. But if using the CLI in Windows, you need to install Bower globally by running the following NPM command:
|
Bower is needed by minor dependencies at the MVC web app. It using Visual Studio, VS will handle that. But if using the CLI in Windows, you need to install Bower globally by running the following NPM command:
|
||||||
|
|
||||||
`npm install -g bower `
|
`npm install -g bower `
|
||||||
|
Loading…
x
Reference in New Issue
Block a user