PowerShell_Scripts/dcdown.ps1

10 lines
344 B
PowerShell

[CmdletBinding(SupportsShouldProcess)]param(
[string[]]$ProjectPath=@($PWD),
[Parameter(Position = 0, ValueFromRemainingArguments = $true)]
[string[]]$CliParams
)
$ProjectPath | ForEach-Object {
docker-compose --file $(Resolve-Path $(Join-Path $_ docker-compose.yml)) down --timeout=3 --volumes --remove-orphans "$CliParams"
}