Skip to content

Commit ef362f0

Browse files
committed
Windows Docker CLI
1 parent b1b3abf commit ef362f0

7 files changed

Lines changed: 33 additions & 14 deletions
File renamed without changes.

build-bits.ps1 renamed to CLI-Windows/build-bits.ps1

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,54 @@
1+
Param([string] $rootPath)
12
$scriptPath = Split-Path $script:MyInvocation.MyCommand.Path
2-
3+
34
Write-Host "Current script directory is $scriptPath" -ForegroundColor Yellow
45

6+
if ([string]::IsNullOrEmpty($rootPath)) {
7+
$rootPath = "$scriptPath\.."
8+
}
9+
Write-Host "Root path used is $rootPath" -ForegroundColor Yellow
10+
511
# *** WebMVC paths ***
6-
$webMVCPath = $scriptPath + "\src\Web\WebMVC"
12+
$webMVCPath = $rootPath + "\src\Web\WebMVC"
713
$webMVCPathToProject = $webMVCPath + "\WebMVC.csproj"
814
Write-Host "webMVCPathToProject is $webMVCPathToProject" -ForegroundColor Yellow
915
$webMVCPathToPub = $webMVCPath + "\obj\Docker\publish"
1016
Write-Host "webMVCPathToPub is $webMVCPathToPub" -ForegroundColor Yellow
1117

1218

1319
# *** WebSPA paths ***
14-
$webSPAPath = $scriptPath + "\src\Web\WebSPA"
20+
$webSPAPath = $rootPath + "\src\Web\WebSPA"
1521
$webSPAPathToProject = $webSPAPath + "\WebSPA.csproj"
1622
Write-Host "webSPAPathToProject is $webSPAPathToProject" -ForegroundColor Yellow
1723
$webSPAPathToPub = $webSPAPath + "\obj\Docker\publish"
1824
Write-Host "webSPAPathToPub is $webSPAPathToPub" -ForegroundColor Yellow
1925

2026

2127
# *** IdentitySvc paths ***
22-
$identitySvcPath = $scriptPath + "\src\Services\Identity\Identity.API"
28+
$identitySvcPath = $rootPath + "\src\Services\Identity\Identity.API"
2329
$identitySvcToProject = $identitySvcPath + "\Identity.API.csproj"
2430
Write-Host "identitySvcToProject is $identitySvcToProject" -ForegroundColor Yellow
2531
$identitySvcPathToPub = $identitySvcPath + "\obj\Docker\publish"
2632
Write-Host "identitySvcPathToPub is $identitySvcPathToPub" -ForegroundColor Yellow
2733

2834

2935
# *** Catalog paths ***
30-
$catalogPath = $scriptPath + "\src\Services\Catalog\Catalog.API"
36+
$catalogPath = $rootPath + "\src\Services\Catalog\Catalog.API"
3137
$catalogPathToProject = $catalogPath + "\Catalog.API.csproj"
3238
Write-Host "catalogPathToProject is $catalogPathToProject" -ForegroundColor Yellow
3339
$catalogPathToPub = $catalogPath + "\obj\Docker\publish"
3440
Write-Host "catalogPathToPub is $catalogPathToPub" -ForegroundColor Yellow
3541

3642

3743
# *** Ordering paths ***
38-
$orderingPath = $scriptPath + "\src\Services\Ordering\Ordering.API"
44+
$orderingPath = $rootPath + "\src\Services\Ordering\Ordering.API"
3945
$orderingPathToProject = $orderingPath + "\Ordering.API.csproj"
4046
Write-Host "orderingPathToProject is $orderingPathToProject" -ForegroundColor Yellow
4147
$orderingPathToPub = $orderingPath + "\obj\Docker\publish"
4248
Write-Host "orderingPathToPub is $orderingPathToPub" -ForegroundColor Yellow
4349

4450
# *** Basket paths ***
45-
$basketPath = $scriptPath + "\src\Services\Basket\Basket.API"
51+
$basketPath = $rootPath + "\src\Services\Basket\Basket.API"
4652
$basketPathToProject = $basketPath + "\Basket.API.csproj"
4753
Write-Host "basketPathToProject is $basketPathToProject" -ForegroundColor Yellow
4854
$basketPathToPub = $basketPath + "\obj\Docker\publish"
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
$scriptPath = Split-Path $script:MyInvocation.MyCommand.Path
2-
3-
Write-Host "Current script directory is $scriptPath" -ForegroundColor Yellow
4-
51
$imagesToDelete = docker images --filter=reference="eshop/*" -q
62

73
If (-Not $imagesToDelete) {Write-Host "Not deleting eShop images as there are no eShop images in the current local Docker repo."}

CLI-Windows/start-external.ps1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Param([string] $rootPath)
2+
$scriptPath = Split-Path $script:MyInvocation.MyCommand.Path
3+
4+
Write-Host "Current script directory is $scriptPath" -ForegroundColor Yellow
5+
6+
if ([string]::IsNullOrEmpty($rootPath)) {
7+
$rootPath = "$scriptPath\.."
8+
}
9+
Write-Host "Root path used is $rootPath" -ForegroundColor Yellow
10+
11+
docker-compose -f "$rootPath\docker-compose-external.yml" -f "$rootPath\docker-compose-external.override.yml" up
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Param([string] $rootPath)
2+
$scriptPath = Split-Path $script:MyInvocation.MyCommand.Path
3+
if ([string]::IsNullOrEmpty($rootPath)) {
4+
$rootPath = "$scriptPath\.."
5+
}
6+
Write-Host "Root path used is $rootPath" -ForegroundColor Yellow
7+
8+
& .\build-bits.ps1 -rootPath $rootPath
9+
docker-compose -f "$rootPath\docker-compose-windows.yml" -f "$rootPath\docker-compose-windows.override.yml" up

start-external.ps1

Lines changed: 0 additions & 1 deletion
This file was deleted.

start-windows-containers.ps1

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)