Add Networks placeholder to ps --format
Passing {{.Networks}} to the format parameter will prompt ps to
display all the networks the container is connected to.
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
@@ -70,6 +70,13 @@ func (p *preProcessor) Size() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// Networks does nothing but return true.
|
||||
// It is needed to avoid the template check to fail as this field
|
||||
// doesn't exist in `types.Container`
|
||||
func (p *preProcessor) Networks() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func buildContainerListOptions(opts *psOptions) (*types.ContainerListOptions, error) {
|
||||
options := &types.ContainerListOptions{
|
||||
All: opts.all,
|
||||
|
||||
Reference in New Issue
Block a user