Bug fix for Get-DockerProcess
Get-Member would error when input was missing.
This commit is contained in:
parent
8cbb2e2252
commit
90bd351641
|
@ -12,11 +12,12 @@ $(docker ps -q) |
|
|||
Status=$tmp.State.Status
|
||||
Image=$tmp.Config.Image
|
||||
Ports=$(
|
||||
$tmp.HostConfig.PortBindings |
|
||||
Get-Member -type NoteProperty | Select-Object -ExpandProperty Name |
|
||||
if( $tmp.HostConfig -and $tmp.HostConfig.PortBindings ) {
|
||||
$tmp.HostConfig.PortBindings | Get-Member -type NoteProperty | Select-Object -ExpandProperty Name |
|
||||
ForEach-Object {
|
||||
"$($tmp.HostConfig.PortBindings."$_".HostPort)/$_"
|
||||
}
|
||||
}
|
||||
)
|
||||
Binds= $tmp.HostConfig.Binds
|
||||
raw = $tmp
|
||||
|
|
Loading…
Reference in New Issue