Updated 03. Setting the eShopOnContainers solution up in a Windows CLI environment (dotnet CLI, Docker CLI and VS Code) (markdown)
parent
a4411c3c48
commit
14c8fbbb21
@ -77,15 +77,11 @@ https://blogs.msdn.microsoft.com/stevelasker/2016/06/14/configuring-docker-for-w
|
|||||||
<img src="img/firewall-rule-for-eshop.png">
|
<img src="img/firewall-rule-for-eshop.png">
|
||||||
|
|
||||||
## .NET Core SDK setup
|
## .NET Core SDK setup
|
||||||
(OPTIONAL) As mentioned, this requirement is optional because when building through the "build container" it will be using the .NET SDK available within the ASPNETCore build image, not the local .NET Core SDK. However, it is recommended to have it installed locally for any further building/testing of the ASP.NET Core projects without Docker.
|
(OPTIONAL) As mentioned, this requirement is optional because when building through Docker Multi-Stage" it will be using the .NET SDK available within the ASP.NET Core build image, not the local .NET Core SDK. However, it is recommended to have it installed locally for any further building/testing of the ASP.NET Core projects without Docker.
|
||||||
The .NET Core SDK install the .NET Core framework plus the SDK CLI tools with commands like "dotnet build", "dotnet publish", etc.
|
The .NET Core SDK install the .NET Core framework plus the SDK CLI tools with commands like "dotnet build", "dotnet publish", etc.
|
||||||
|
|
||||||
Install the .NET Core SDK from here
|
Install the .NET Core SDK from here:
|
||||||
https://www.microsoft.com/net/download/core#/current
|
https://www.microsoft.com/net/download/windows#/current
|
||||||
(Current/x64 .NET Core 1.1 SDK Installer, usually)
|
|
||||||
|
|
||||||
Run the setup like in the following screenshot:
|
|
||||||
<img src="img/netcore-sdk-11-installer.png">
|
|
||||||
|
|
||||||
## Install NPM
|
## Install NPM
|
||||||
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.
|
||||||
@ -130,9 +126,9 @@ After a successful execution of those npm commands, move to the next step.
|
|||||||
If you have any issue here, read the [Setting the Web SPA application up](https://github.com/dotnet/eShopOnContainers/wiki/06.-Setting-the-Web-SPA-application-up) for further details.
|
If you have any issue here, read the [Setting the Web SPA application up](https://github.com/dotnet/eShopOnContainers/wiki/06.-Setting-the-Web-SPA-application-up) for further details.
|
||||||
|
|
||||||
|
|
||||||
# Build Docker images and compile the application's projects with a single command thanks to Docker Multi-Stage
|
# Compile the application's projects and build the Docker images with a single command thanks to Docker Multi-Stage
|
||||||
|
|
||||||
The recommended approach is to build the .NET bits and Docker images with a single command based on Docker Multi-Stage by simply running the following command within the solution's root folder:
|
The recommended approach is to build the .NET bits and Docker images with a single command based on [Docker Multi-Stage](https://blogs.msdn.microsoft.com/stevelasker/2017/09/11/net-and-multistage-dockerfiles/) by simply running the following command within the solution's root folder:
|
||||||
|
|
||||||
Move to the root folder of the solution: <p>
|
Move to the root folder of the solution: <p>
|
||||||
`cd YourPath\eShopOnContainers\`
|
`cd YourPath\eShopOnContainers\`
|
||||||
@ -154,7 +150,7 @@ With a single command you can deploy the whole solution into your local Docker h
|
|||||||
|
|
||||||
<img src="img/cli-windows/docker-compose-up-1.png">
|
<img src="img/cli-windows/docker-compose-up-1.png">
|
||||||
|
|
||||||
Note that the first time you try to build any image or run any container (with docker run or docker-compose) it detects that it needs the base images you are using, like the SQL Server image and the Redis image, so it will pull or download those base images from the Internet, from the public repo at the Docker registry named DOCKER HUB, by pulling the "microsoft/mssql-server-linux" which is the base image for the SQL Server for Linux on containers, and the "library/redis" which is the base Redis image. Therefore, the first time you run docker-compose it might take a few minutes pulling those images before it spins up your custom containers.
|
Note that if you didn't previously run `docker-compose build`, the first time you try to run any container (with docker run or docker-compose) it detects that it needs the base images you are using, like the SQL Server image and the Redis image, so it will pull or download those base images from the Internet, from the public repo at the Docker registry named DOCKER HUB, by pulling the "microsoft/mssql-server-linux" which is the base image for the SQL Server for Linux on containers, and the "library/redis" which is the base Redis image. Therefore, the first time you run docker-compose it might take a few minutes pulling those images before it spins up your custom containers.
|
||||||
The next time you run docker-compose up, since it'll have those base images already pulled/downloaded, it will be much faster.
|
The next time you run docker-compose up, since it'll have those base images already pulled/downloaded, it will be much faster.
|
||||||
|
|
||||||
Finally, you can see how the scripts waits after deploying all the containers:
|
Finally, you can see how the scripts waits after deploying all the containers:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user