docker

package
v0.0.0-...-028f1de Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListContainers

func ListContainers(timeout time.Duration, showAllContainers bool) ([]model.Container, error)

func StripAndSelectName

func StripAndSelectName(names []string) string

Container names in output of `docker ps`, `docker container list` or `docker list` are not prefixed by a slash '/'. HOWEVER container names got from docker's client.ContainerList() does have it, i.e., what you see is NOT what you get. Looking inside the source of docker CLI, magics are applied to these names before presented to Muggles, and that's what we need in our humble post-processing phrase on the response of docker API. See link below for detail implementation in docker CLI: https://github.com/docker/cli/blob/67cc8b1fd88aea06690eaf3e5d56acd68a0178d2/cli/command/formatter/container.go#L125-L148

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL