PowerShell_Scripts/docker/dcr.ps1

13 lines
582 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+@('run'))})]
[array]$CliParams=@('--rm')
)
if( $CliParams[0] -is [string] ) { $CliParams = @($CliParams,@($null)) }
$CliParams[0] = @('run') + $CliParams[0]
Invoke-DockerCompose -ProjectPath $ProjectPath -CliParams $CliParams