docker

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlePullOutput

func HandlePullOutput(
	pullOutputReader io.Reader,
	streamHandler func(logLine string) error,
) error

Taken and adapted from https://github.com/moby/moby/blob/master/pkg/jsonmessage/jsonmessage.go

func IsContainerRunning

func IsContainerRunning(
	dockerClient *client.Client,
	containerName string,
) (bool, error)

func LookupContainer

func LookupContainer(
	dockerClient *client.Client,
	containerName string,
) (*types.Container, error)

func NewDefaultClient

func NewDefaultClient() (*client.Client, error)

Types

type ContainerState

type ContainerState string
const (
	ContainerStateCreated    ContainerState = "created"
	ContainerStateRestarting ContainerState = "restarting"
	ContainerStateRunning    ContainerState = "running"
	ContainerStatePaused     ContainerState = "paused"
	ContainerStateExited     ContainerState = "exited"
	ContainerStateDead       ContainerState = "dead"
)

Jump to

Keyboard shortcuts

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