docker

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindK8SPauseContainerID

func FindK8SPauseContainerID(containers []types.Container, PodName, Namespace, PodUUID string) (string, error)

FindK8SPauseContainerID : Use pod-name, k8s-namespace, pod-uuid to match container-id in containers

func GetSandboxKey

func GetSandboxKey(containerInfo types.ContainerJSON) string

GetSandboxKey : docker inspect <Container ID> | grep -E 'SandboxKey|Id'

Types

type Client

type Client struct {
	*docker.Client
	Context context.Context
}

Client : include docker client and context

func New

func New() (*Client, error)

New : init Client

func (*Client) InspectContainer

func (c *Client) InspectContainer(containerID string) (types.ContainerJSON, error)

InspectContainer : docker inspect <Container ID>

func (*Client) ListContainer

func (c *Client) ListContainer() ([]types.Container, error)

ListContainer : docker ps -a

Jump to

Keyboard shortcuts

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