From 249f46a98b063af0167aee6983070c79df64480b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Tom=C3=A0s?= Date: Tue, 5 Sep 2017 15:20:46 +0200 Subject: [PATCH] Updated 08. Setting up and Deploying eShopOnContainers to Windows Containers (markdown) --- ...ng-eShopOnContainers-to-Windows-Containers.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/08.-Setting-up-and-Deploying-eShopOnContainers-to-Windows-Containers.md b/08.-Setting-up-and-Deploying-eShopOnContainers-to-Windows-Containers.md index c4d0911..bc5d693 100644 --- a/08.-Setting-up-and-Deploying-eShopOnContainers-to-Windows-Containers.md +++ b/08.-Setting-up-and-Deploying-eShopOnContainers-to-Windows-Containers.md @@ -80,4 +80,18 @@ If you prefer to use `docker-compose` you can do it. Just call it without the `d ``` docker-compose -f docker-compose-windows.yml -f docker-compose.override.yml up -``` \ No newline at end of file +``` + +## The localhost loopback limitation + +Due to a default NAT limitation in Windows (see [https://blog.sixeyed.com/published-ports-on-windows-containers-dont-do-loopback/](https://blog.sixeyed.com/published-ports-on-windows-containers-dont-do-loopback/)) you can't access your containers using `localhost`. + +Instead of localhost you can use the host's IP inside the DockerNAT, that is `10.0.75.1`. If you use `start-windows-containers.ps1` to start the containers the script do the needed configuration for you, but if you use docker-compose then you have to set the following environment variables: + +* `ESHOP_EXTERNAL_DNS_NAME_OR_IP` to `10.75.0.1` +* `ESHOP_AZURE_STORAGE_CATALOG_URL` to `http://10.0.75.1:5101/api/v1/catalog/items/[0]/pic/` +* `ESHOP_AZURE_STORAGE_MARKETING_URL` to `http://10.0.75.1:5110/api/v1/campaigns/[0]/pic/` + +Note that the two last must be set only if you have not set them (so, if you are not using Azure Storage for the images). If you are using azure storage for the images, you can leave them. + +Once these variables are set you can run docker-compose to start the containers and navigate to `http://10.0.75.1:5100` to view the MVC Web app. \ No newline at end of file