PowerShell_Scripts/docker/dcdown.ps1

23 lines
732 B
PowerShell

[CmdletBinding(SupportsShouldProcess)]param(
[ArgumentCompleter({ param (
$commandName,
$parameterName,
$wordToComplete,
$commandAst,
$fakeBoundParameters
)
[DockerComposeDirs]::_GetValidValues($wordToComplete,$true)
})]
[string[]]$ProjectPath,
[switch]$Recurse,
[int]$Depth=1,
[Parameter(Position = 0, ValueFromRemainingArguments = $true)]
[array]$CliParams=@('--timeout=3','--volumes','--remove-orphans')
)
if( -not $CliParams -or $CliParams[0] -is [string] ) { $CliParams = @($CliParams,@($null)) }
$CliParams[0] = @('&','down') + $CliParams[0]
Invoke-DockerCompose -ProjectPath $ProjectPath -CliParams $CliParams -Recurse:$Recurse -Depth $Depth