Updated 08. Setting up and Deploying eShopOnContainers to Windows Containers (markdown)
parent
cc7c34dfe4
commit
53b604d6a9
@ -26,22 +26,27 @@ Then right click in the Docker icon on the notification bar and select the optio
|
|||||||
## Deploy Windows Containers of eShopOnContaners
|
## Deploy Windows Containers of eShopOnContaners
|
||||||
Since eShopOnContainers is using Docker Multi-Stage builds, the compilation of the .NET application bits is now performed by Docker itself right before building the Docker images.
|
Since eShopOnContainers is using Docker Multi-Stage builds, the compilation of the .NET application bits is now performed by Docker itself right before building the Docker images.
|
||||||
|
|
||||||
|
Although you can create the Docker images when trying to run the containers, let's split it in two steps, so it is clearer.
|
||||||
|
|
||||||
|
### 1. Compile the .NET application/services bits and build the Docker images for Windows Containers
|
||||||
|
|
||||||
|
In order compile the bits and build the Docker images, run:
|
||||||
|
```
|
||||||
|
cd <root-folder-of--eshoponcontainers>
|
||||||
|
docker-compose -f docker-compose-windows.yml build
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Deploy/run the containers
|
||||||
|
|
||||||
The esasiest way to run/start the Windows Containers of eShopOnContainers is by running this PowerShell script:
|
The esasiest way to run/start the Windows Containers of eShopOnContainers is by running this PowerShell script:
|
||||||
|
|
||||||
`start-windows-containers.ps1`
|
`start-windows-containers.ps1`
|
||||||
|
|
||||||
You can find this script at /cli-windows/start-windows-containers.ps1
|
You can find this script at /cli-windows/start-windows-containers.ps1
|
||||||
|
|
||||||
Otherwise, if you run it directly with `docker-compose up` see the section below on the environment variables you will also need to configure.
|
Otherwise, you could also run it directly with `docker-compose up` but then you'd be missing a few environment variables needed for Windows Containers. See the section below on the environment variables you will also need to configure.
|
||||||
|
|
||||||
Under the covers, in any case, the important commands are the following:
|
Under the covers, in any case, the start-windows-containers.ps1 is running this command to deploy/run the containers:
|
||||||
|
|
||||||
Build bits and Docker images:
|
|
||||||
```
|
|
||||||
docker-compose -f docker-compose-windows.yml build
|
|
||||||
```
|
|
||||||
|
|
||||||
Deploy the containers with the specific configuration for Windows Containers:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
docker-compose -f docker-compose-windows.yml -f docker-compose.override.yml -f docker-compose.override.windows.yml up
|
docker-compose -f docker-compose-windows.yml -f docker-compose.override.yml -f docker-compose.override.windows.yml up
|
||||||
|
Loading…
x
Reference in New Issue
Block a user