docker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleBuildOutput

func HandleBuildOutput(
	buildOutputReader io.Reader,
	streamHandler func(logLine string) error,
) error

func IsContainerRunning

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

func LookupContainer

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

func LookupDockerfileBaseImage

func LookupDockerfileBaseImage(dockerfilePath string) (string, error)

func LookupDockerfileLabelValue

func LookupDockerfileLabelValue(
	dockerfilePath string,
	searchedLabelKey string,
) (string, error)

func NewDefaultClient

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

Types

type BuildErrorDetail

type BuildErrorDetail struct {
	Message string `json:"message"`
}

type BuildOutput

type BuildOutput struct {
	Stream      string           `json:"stream"`
	Error       string           `json:"error"`
	ErrorDetail BuildErrorDetail `json:"errorDetail"`
}

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