From 1c1a6c936921c66ee1135660401aa48fc255a520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Tom=C3=A0s?= Date: Tue, 12 Jun 2018 19:04:48 +0200 Subject: [PATCH] Updated 08. Setting up and Deploying eShopOnContainers to Windows Containers (markdown) --- ...eShopOnContainers-to-Windows-Containers.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) 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 4266164..bf6d74c 100644 --- a/08.-Setting-up-and-Deploying-eShopOnContainers-to-Windows-Containers.md +++ b/08.-Setting-up-and-Deploying-eShopOnContainers-to-Windows-Containers.md @@ -57,9 +57,11 @@ Although you can create the Docker images when trying to run the containers, let In order compile the bits and build the Docker images, run: ``` cd -docker-compose -f docker-compose-windows.yml build +docker-compose -f docker-compose.yml -f docker-compose.windows.yml build ``` +**Note** Be sure to pass both `-f` when building containers for windows containers! + ### 2. Deploy/run the containers The esasiest way to run/start the Windows Containers of eShopOnContainers is by running this PowerShell script: @@ -73,10 +75,18 @@ Otherwise, you could also run it directly with `docker-compose up` but then you' Under the covers, in any case, the start-windows-containers.ps1 is running this command to deploy/run the containers: ``` -docker-compose -f docker-compose-windows.yml -f docker-compose.override.yml -f docker-compose.override.windows.yml up +set ESHOP_OCELOT_VOLUME_SPEC=C:\app\configuration +docker-compose -f docker-compose-windows.yml -f docker-compose.override.yml -f -f docker-compose.windows.yml -f docker-compose.override.windows.yml up ``` -**IMPORTANT**: You need to use these three files when running docker-compose up and to have te environment variables related to the localhost loopback limitation mentioned at the end of this post. +**IMPORTANT**: You need to those files when running docker-compose up **and the `ESHOP_OCELOT_VOLUME_SPEC` environment variable must be set to `C:\app\configuration`.Also yo have to have the environment variables related to the localhost loopback limitation mentioned at the end of this post. + +Just for reference here are the docker compose files and what they do: + +1. `docker-compose.yml`: Main compose file. Define all services for both Linux & Windows and set base images for Linux +2. `docker-compose.override.yml`: Main override file. Define all config for both Linux & Windows, with Linux-based defaults +3. `docker-compose.windows.override.yml`: Overrides some previous data (like images) for Windows containers +4. `docker-compose.windows.override.yml`: Adds specific windows-only configuration ## Test/use the eShopOnContainers MVC app in a browser @@ -115,6 +125,7 @@ When passing the parameter `-customEventBusLoginPassword $true` to the script yo If you prefer to use `docker-compose` you can do it. Just call it without the `docker-compose.override.windows.yml` file: ``` - docker-compose -f docker-compose-windows.yml -f docker-compose.override.yml up + set ESHOP_OCELOT_VOLUME_SPEC=C:\app\configuration + docker-compose -f docker-compose-windows.yml -f docker-compose.override.yml -f docker-compose.windows.yml up ```