docker

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 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