Windows Docker CLI

This commit is contained in:
etomas 2017-03-03 12:44:27 +01:00
parent b1b3abfcff
commit ef362f0140
7 changed files with 33 additions and 14 deletions

View File

@ -1,9 +1,15 @@
Param([string] $rootPath)
$scriptPath = Split-Path $script:MyInvocation.MyCommand.Path
Write-Host "Current script directory is $scriptPath" -ForegroundColor Yellow
if ([string]::IsNullOrEmpty($rootPath)) {
$rootPath = "$scriptPath\.."
}
Write-Host "Root path used is $rootPath" -ForegroundColor Yellow
# *** WebMVC paths ***
$webMVCPath = $scriptPath + "\src\Web\WebMVC"
$webMVCPath = $rootPath + "\src\Web\WebMVC"
$webMVCPathToProject = $webMVCPath + "\WebMVC.csproj"
Write-Host "webMVCPathToProject is $webMVCPathToProject" -ForegroundColor Yellow
$webMVCPathToPub = $webMVCPath + "\obj\Docker\publish"
@ -11,7 +17,7 @@ Write-Host "webMVCPathToPub is $webMVCPathToPub" -ForegroundColor Yellow
# *** WebSPA paths ***
$webSPAPath = $scriptPath + "\src\Web\WebSPA"
$webSPAPath = $rootPath + "\src\Web\WebSPA"
$webSPAPathToProject = $webSPAPath + "\WebSPA.csproj"
Write-Host "webSPAPathToProject is $webSPAPathToProject" -ForegroundColor Yellow
$webSPAPathToPub = $webSPAPath + "\obj\Docker\publish"
@ -19,7 +25,7 @@ Write-Host "webSPAPathToPub is $webSPAPathToPub" -ForegroundColor Yellow
# *** IdentitySvc paths ***
$identitySvcPath = $scriptPath + "\src\Services\Identity\Identity.API"
$identitySvcPath = $rootPath + "\src\Services\Identity\Identity.API"
$identitySvcToProject = $identitySvcPath + "\Identity.API.csproj"
Write-Host "identitySvcToProject is $identitySvcToProject" -ForegroundColor Yellow
$identitySvcPathToPub = $identitySvcPath + "\obj\Docker\publish"
@ -27,7 +33,7 @@ Write-Host "identitySvcPathToPub is $identitySvcPathToPub" -ForegroundColor Yell
# *** Catalog paths ***
$catalogPath = $scriptPath + "\src\Services\Catalog\Catalog.API"
$catalogPath = $rootPath + "\src\Services\Catalog\Catalog.API"
$catalogPathToProject = $catalogPath + "\Catalog.API.csproj"
Write-Host "catalogPathToProject is $catalogPathToProject" -ForegroundColor Yellow
$catalogPathToPub = $catalogPath + "\obj\Docker\publish"
@ -35,14 +41,14 @@ Write-Host "catalogPathToPub is $catalogPathToPub" -ForegroundColor Yellow
# *** Ordering paths ***
$orderingPath = $scriptPath + "\src\Services\Ordering\Ordering.API"
$orderingPath = $rootPath + "\src\Services\Ordering\Ordering.API"
$orderingPathToProject = $orderingPath + "\Ordering.API.csproj"
Write-Host "orderingPathToProject is $orderingPathToProject" -ForegroundColor Yellow
$orderingPathToPub = $orderingPath + "\obj\Docker\publish"
Write-Host "orderingPathToPub is $orderingPathToPub" -ForegroundColor Yellow
# *** Basket paths ***
$basketPath = $scriptPath + "\src\Services\Basket\Basket.API"
$basketPath = $rootPath + "\src\Services\Basket\Basket.API"
$basketPathToProject = $basketPath + "\Basket.API.csproj"
Write-Host "basketPathToProject is $basketPathToProject" -ForegroundColor Yellow
$basketPathToPub = $basketPath + "\obj\Docker\publish"

View File

@ -1,7 +1,3 @@
$scriptPath = Split-Path $script:MyInvocation.MyCommand.Path
Write-Host "Current script directory is $scriptPath" -ForegroundColor Yellow
$imagesToDelete = docker images --filter=reference="eshop/*" -q
If (-Not $imagesToDelete) {Write-Host "Not deleting eShop images as there are no eShop images in the current local Docker repo."}

View File

@ -0,0 +1,11 @@
Param([string] $rootPath)
$scriptPath = Split-Path $script:MyInvocation.MyCommand.Path
Write-Host "Current script directory is $scriptPath" -ForegroundColor Yellow
if ([string]::IsNullOrEmpty($rootPath)) {
$rootPath = "$scriptPath\.."
}
Write-Host "Root path used is $rootPath" -ForegroundColor Yellow
docker-compose -f "$rootPath\docker-compose-external.yml" -f "$rootPath\docker-compose-external.override.yml" up

View File

@ -0,0 +1,9 @@
Param([string] $rootPath)
$scriptPath = Split-Path $script:MyInvocation.MyCommand.Path
if ([string]::IsNullOrEmpty($rootPath)) {
$rootPath = "$scriptPath\.."
}
Write-Host "Root path used is $rootPath" -ForegroundColor Yellow
& .\build-bits.ps1 -rootPath $rootPath
docker-compose -f "$rootPath\docker-compose-windows.yml" -f "$rootPath\docker-compose-windows.override.yml" up

View File

@ -1 +0,0 @@
docker-compose -f docker-compose-external.yml -f docker-compose-external.override.yml up

View File

@ -1,2 +0,0 @@
& .\build-bits.ps1
docker-compose -f docker-compose-windows.yml -f docker-compose-windows.override.yml up