PowerShell_Scripts/docker/dcre.ps1

13 lines
600 B
PowerShell
Raw Normal View History

[CmdletBinding(SupportsShouldProcess)]param(
2021-03-23 05:06:49 +00:00
[ArgumentCompleter({Invoke-Command -ScriptBlock $_DockerComposeDirsCompleter -ArgumentList $args})]
[string[]]$ProjectPath=@($PWD),
[Parameter(Position = 0, ValueFromRemainingArguments = $true)]
2021-03-23 05:06:49 +00:00
[ArgumentCompleter({Invoke-Command -ScriptBlock $_DockerComposeCompleter -ArgumentList ($args+@('restart'))})]
[array]$CliParams
)
if( -not $CliParams -or $CliParams[0] -is [string] ) { $CliParams = @($CliParams,@($null)) }
$CliParams[0] = @('restart') + $CliParams[0]
Invoke-DockerCompose -ProjectPath $ProjectPath -CliParams $CliParams