Fix folder for windows networking scripts

Miguel Veloso 2019-12-17 13:51:53 +00:00
parent 5114850f80
commit 72f7fc0b93
4 changed files with 23 additions and 23 deletions

@ -31,7 +31,7 @@ The drive you'll need to share depends on where you place your source code.
IMPORTANT: Ports 5100 to 5105 must be open in the local Firewall, so authentication to the STS (Security Token Service container, based on IdentityServer) can be done through the 10.0.75.1 IP, which should be available and already setup by Docker. These ports are also needed for client remote apps like Xamarin app or SPA app in a remote browser. IMPORTANT: Ports 5100 to 5105 must be open in the local Firewall, so authentication to the STS (Security Token Service container, based on IdentityServer) can be done through the 10.0.75.1 IP, which should be available and already setup by Docker. These ports are also needed for client remote apps like Xamarin app or SPA app in a remote browser.
You can manually create a rule in your local firewall in your development machine or you can just run 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 just run the **`add-firewall-rules-for-sts-auth-thru-docker.ps1`** script available in the solution's **`deploy\windows\`** folder.
![](images/Docker-configuration/firewall-rule-for-eshop.png) ![](images/Docker-configuration/firewall-rule-for-eshop.png)
@ -65,7 +65,7 @@ The installation process should look something like this:
- **[eShopOnContainers issue] Can't display login page on MVC app** \ - **[eShopOnContainers issue] Can't display login page on MVC app** \
<https://github.com/dotnet-architecture/eShopOnContainers/issues/295#issuecomment-327973650> <https://github.com/dotnet-architecture/eShopOnContainers/issues/295#issuecomment-327973650>
- **[docs.microsoft.com issue] Configuring Windows vEthernet Adapter Networks to Properly Support Docker Container Volumes** \ - **[docs.microsoft.com issue] Configuring Windows vEthernet Adapter Networks to Properly Support Docker Container Volumes** \
<https://github.com/dotnet/docs/issues/11528#issuecomment-486662817> <https://github.com/dotnet/docs/issues/11528#issuecomment-486662817>

@ -2,14 +2,14 @@ These are the most frequent errors encountered when running eShopOnContainers fo
> **CONTENT** > **CONTENT**
- [When trying to log in from the MVC app I get an error](#When-trying-to-log-in-from-the-MVC-app-I-get-an-error) - [When trying to log in from the MVC app I get an error](#when-trying-to-log-in-from-the-mvc-app-i-get-an-error)
- [Deploying in Windows with Docker for Windows](#Deploying-in-Windows-with-Docker-for-Windows) - [Deploying in Windows with Docker for Windows](#deploying-in-windows-with-docker-for-windows)
- [Deploying in a Mac with Docker for Mac](#Deploying-in-a-Mac-with-Docker-for-Mac) - [Deploying in a Mac with Docker for Mac](#deploying-in-a-mac-with-docker-for-mac)
- [Additional resources](#Additional-resources) - [Additional resources](#additional-resources)
- [The SQL Server container is not running](#The-SQL-Server-container-is-not-running) - [The SQL Server container is not running](#the-sql-server-container-is-not-running)
- [When I run the solution (using Visual Studio or the CLI) I get warnings like 'The ESHOP_AZURE_XXXX variable is not set...'](#When-I-run-the-solution-using-Visual-Studio-or-the-CLI-I-get-warnings-like-The-ESHOPAZUREXXXX-variable-is-not-set) - [When I run the solution (using Visual Studio or the CLI) I get warnings like 'The ESHOP_AZURE_XXXX variable is not set...'](#when-i-run-the-solution-using-visual-studio-or-the-cli-i-get-warnings-like-the-eshopazurexxxx-variable-is-not-set)
- [When I run 'docker-compose up' I get an error like ERROR: Service 'xxxxx' failed to build: COPY failed: stat ...: no such file or directory](#When-I-run-docker-compose-up-I-get-an-error-like-ERROR-Service-xxxxx-failed-to-build-COPY-failed-stat--no-such-file-or-directory) - [When I run 'docker-compose up' I get an error like ERROR: Service 'xxxxx' failed to build: COPY failed: stat ...: no such file or directory](#when-i-run-docker-compose-up-i-get-an-error-like-error-service-xxxxx-failed-to-build-copy-failed-stat--no-such-file-or-directory)
- [When I try to run the solution in 'Docker for Windows' (on the Linux VM) I get the error: 'Did you mean to run dotnet SDK commands?'](#When-I-try-to-run-the-solution-in-Docker-for-Windows-on-the-Linux-VM-I-get-the-error-Did-you-mean-to-run-dotnet-SDK-commands) - [When I try to run the solution in 'Docker for Windows' (on the Linux VM) I get the error: 'Did you mean to run dotnet SDK commands?'](#when-i-try-to-run-the-solution-in-docker-for-windows-on-the-linux-vm-i-get-the-error-did-you-mean-to-run-dotnet-sdk-commands)
## When trying to log in from the MVC app I get an error ## When trying to log in from the MVC app I get an error
@ -24,7 +24,7 @@ First open a browser and navigate to <http://10.0.75.1:5105/.well-known/openid-c
If response is received the problem is that the request from a container cannot reach the `10.0.75.1` (which is the IP of the host machine inside the DockerNAT). Be sure that: If response is received the problem is that the request from a container cannot reach the `10.0.75.1` (which is the IP of the host machine inside the DockerNAT). Be sure that:
- You have opened the ports of the firewall (run the script `cli-windows\add-firewall-rules-for-sts-auth-thru-docker.ps1` - You have opened the ports of the firewall (run the script **`deploy\windows\add-firewall-rules-for-sts-auth-thru-docker.ps1`**)
If this do not solved your problem ensure that the `vpnkit` of the firewall is disabled. For more info refer to @huangmaoyixxx's comment in [issue #295](https://github.com/dotnet-architecture/eShopOnContainers/issues/295) If this do not solved your problem ensure that the `vpnkit` of the firewall is disabled. For more info refer to @huangmaoyixxx's comment in [issue #295](https://github.com/dotnet-architecture/eShopOnContainers/issues/295)

@ -70,7 +70,7 @@ If you were to access the Docker containers from remote machines or mobile phone
### Setting up the docker-compose environment variables and settings ### Setting up the docker-compose environment variables and settings
As explained in the [networking page of Docker Desktop for Mac](https://docs.docker.com/docker-for-mac/networking/#use-cases-and-workarounds), As explained in the [networking page of Docker Desktop for Mac](https://docs.docker.com/docker-for-mac/networking/#use-cases-and-workarounds),
the Mac has a changing IP address (or none if you have no network access). So the recommendation now 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. the Mac has a changing IP address (or none if you have no network access). So the recommendation now 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.
In the `docker-compose.override.yml` file, replace the IdentityUrl environment variable (or any place where the IP 10.0.75.1 is used) with: In the `docker-compose.override.yml` file, replace the IdentityUrl environment variable (or any place where the IP 10.0.75.1 is used) with:
@ -79,7 +79,7 @@ In the `docker-compose.override.yml` file, replace the IdentityUrl environment v
IdentityUrl=http://docker.for.mac.localhost:5105 IdentityUrl=http://docker.for.mac.localhost:5105
``` ```
You could also set your real IP at the Mac's network adapter. But that would be a worse solution as it'll depend on the network you are connecting your Mac development machine.. You could also set your real IP at the Mac's network adapter. But that would be a worse solution as it'll depend on the network you are connecting your Mac development machine..
Therefore, the WebMVC service definition at the `docker-compose.override.yml` should finally be configured as shown bellow: Therefore, the WebMVC service definition at the `docker-compose.override.yml` should finally be configured as shown bellow:
@ -178,7 +178,7 @@ git clone https://github.com/dotnet-architecture/eShopOnContainers.git
### 3. Build the application ### 3. Build the application
```console ```console
cd eShopOnContainers cd eShopOnContainers\src
docker-compose build docker-compose build
``` ```
@ -186,7 +186,7 @@ While building the docker images should take between 15 and 30 minutes to comple
![](images/Mac-setup/building-eshoponcontainers.png) ![](images/Mac-setup/building-eshoponcontainers.png)
The first time you run this command it'll take some more additional time as it needs to pull/download the dotnet/core/aspnet and SDK images, so it'll take its time. The first time you run this command it'll take some more additional time as it needs to pull/download the `dotnet/core/aspnet` and SDK images, so it'll take its time.
When the `docker-compose build` command finishes, you can check out with Docker CLI the images created with the following Docker command: When the `docker-compose build` command finishes, you can check out with Docker CLI the images created with the following Docker command:
@ -198,9 +198,9 @@ docker images
Those are the Docker images available in your local image repository. Those are the Docker images available in your local image repository.
You might have additional images, but you should see, at least, the the custom images starting with the prefix "eshop/" which is the name of the eShopOnContainers images repo. You might have additional images, but you should see, at least, the the custom images starting with the prefix `eshop/` which is the name of the eShopOnContainers images repo.
The images starting with `<none>` haven't been tagged with a name and are intermediate images of the build process. Other named images that don't start with "eshop/" are official base-images like the microsoft/aspnetcore or the SQL Server for Linux images. The images starting with `<none>` haven't been tagged with a name and are intermediate images of the build process. Other named images that don't start with `eshop/` are official base-images like the `mcr.microsoft.com/dotnet` or the SQL Server for Linux images.
### 4. Deploy to the local Docker host ### 4. Deploy to the local Docker host
@ -266,7 +266,7 @@ If you just want to run the containers/microservices and web apps, do NOT open t
After opening the `eShopOnContainers-ServicesAndWebApps.sln` solution for the first time, it is recommended to wait for a few minutes as VS will be restoring many NuGet packages and the solution won't be able to compile or run until it gets all the nuGet packages dependencies, in the first place (this time is only needed the first time you open the solution. Next times it's a lot faster). After opening the `eShopOnContainers-ServicesAndWebApps.sln` solution for the first time, it is recommended to wait for a few minutes as VS will be restoring many NuGet packages and the solution won't be able to compile or run until it gets all the nuGet packages dependencies, in the first place (this time is only needed the first time you open the solution. Next times it's a lot faster).
This is VS for Mac with the `eShopOnContainers-ServicesAndWebApps.sln` solution. This is VS for Mac with the `eShopOnContainers-ServicesAndWebApps.sln` solution.
![](images/Mac-setup/eshoponcontainers-solution.png) ![](images/Mac-setup/eshoponcontainers-solution.png)
@ -278,7 +278,7 @@ Hit Ctrl+F5 or press the "play" button in VS for Mac.
IMPORTANT: The first time you run eShopOnContainers, it will take longer than the next time you launch it. Under the covers, Docker is pulling quite a few "heavy" images from Docker Hub (the public image registry), like the SQL Server image, Redis image, RabbitMQ image and the base ASP.NET Core images. That pull/download process will take a few minutes. Then, VS will launch the application custom containers plus the infrastructure containers (SQL, Redis, RabbitMQ and MongoDB), populate sample data in the databases and finally run the microservices and web apps on custom containers. IMPORTANT: The first time you run eShopOnContainers, it will take longer than the next time you launch it. Under the covers, Docker is pulling quite a few "heavy" images from Docker Hub (the public image registry), like the SQL Server image, Redis image, RabbitMQ image and the base ASP.NET Core images. That pull/download process will take a few minutes. Then, VS will launch the application custom containers plus the infrastructure containers (SQL, Redis, RabbitMQ and MongoDB), populate sample data in the databases and finally run the microservices and web apps on custom containers.
Note that you will see normal/controlled Http exceptions caused by our retries with exponential backoff, as the web apps have to wait until the microservices are ready for the first time which need first to run SQL sentences populating sample data, etc. Note that you will see normal/controlled Http exceptions caused by our retries with exponential backoff, as the web apps have to wait until the microservices are ready for the first time which need first to run SQL sentences populating sample data, etc.
Once the solution is up and running, you should be able to see it in the browser at: Once the solution is up and running, you should be able to see it in the browser at:
@ -303,7 +303,7 @@ You should be now ready to begin learning by [exploring the code](Explore-the-co
## Configuring the app for external access from remote client apps ## Configuring the app for external access from remote client apps
If using the services from remote apps, like the a phone with the Xamarin mobile app in the same Wifi network, or the web apps accessing remotely to the Docker Host, you need to change a few by-default URLs. If using the services from remote apps, like the a phone with the Xamarin mobile app in the same Wifi network, or the web apps accessing remotely to the Docker Host, you need to change a few by-default URLs.
eShopOnContainers app uses the .env file to set certain by-default environment variables used by the multiple docker-compose.override you can have. eShopOnContainers app uses the .env file to set certain by-default environment variables used by the multiple docker-compose.override you can have.
Therefore, the following change must be done in the .env file at the root of the eShopOnContainers folder. Therefore, the following change must be done in the .env file at the root of the eShopOnContainers folder.

@ -26,7 +26,7 @@ The approach followed is to have the app running from the CLI first, since it's
- [Build and run the application with F5 or Ctrl+F5](#build-and-run-the-application-with-f5-or-ctrlf5) - [Build and run the application with F5 or Ctrl+F5](#build-and-run-the-application-with-f5-or-ctrlf5)
- [Set docker-compose as the default StartUp project](#set-docker-compose-as-the-default-startup-project) - [Set docker-compose as the default StartUp project](#set-docker-compose-as-the-default-startup-project)
- [Debug with several breakpoints across the multiple containers/projects](#debug-with-several-breakpoints-across-the-multiple-containersprojects) - [Debug with several breakpoints across the multiple containers/projects](#debug-with-several-breakpoints-across-the-multiple-containersprojects)
- [Issue with "Visual Studio 2017 Tools for Docker" and network proxies/firewalls](#issue-with-%22visual-studio-2017-tools-for-docker%22-and-network-proxiesfirewalls) - [Issue with &quot;Visual Studio 2017 Tools for Docker&quot; and network proxies/firewalls](#issue-with-quotvisual-studio-2017-tools-for-dockerquot-and-network-proxiesfirewalls)
- [Optional - Use Visual Studio Code](#optional---use-visual-studio-code) - [Optional - Use Visual Studio Code](#optional---use-visual-studio-code)
- [Explore the code](#explore-the-code) - [Explore the code](#explore-the-code)
- [Low memory configuration](#low-memory-configuration) - [Low memory configuration](#low-memory-configuration)
@ -67,7 +67,7 @@ The drive you'll need to share depends on where you place your source code.
IMPORTANT: Ports 5100 to 5105 must be open in the local Firewall, so authentication to the STS (Security Token Service container, based on IdentityServer) can be done through the 10.0.75.1 IP, which should be available and already setup by Docker. These ports are also needed for client remote apps like Xamarin app or SPA app in a remote browser. IMPORTANT: Ports 5100 to 5105 must be open in the local Firewall, so authentication to the STS (Security Token Service container, based on IdentityServer) can be done through the 10.0.75.1 IP, which should be available and already setup by Docker. These ports are also needed for client remote apps like Xamarin app or SPA app in a remote browser.
You can manually create a rule in your local firewall in your development machine or you can just run the **add-firewall-rules-for-sts-auth-thru-docker.ps1** 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 just run the **add-firewall-rules-for-sts-auth-thru-docker.ps1** script available in the solution's **`deploy\windows\`** folder.
![](images/Windows-setup/firewall-rule-for-eshop.png) ![](images/Windows-setup/firewall-rule-for-eshop.png)
@ -98,7 +98,7 @@ git clone https://github.com/dotnet-architecture/eShopOnContainers.git
### 3. Build the application ### 3. Build the application
```console ```console
cd eShopOnContainers cd eShopOnContainers\src
docker-compose build docker-compose build
``` ```