docker

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Load loads the image from the reader to the docker host.
	Load(ctx context.Context, r io.ReadCloser, quiet bool) error
	// Start creates the container for the given tag and container name.
	StartEnvd(ctx context.Context, tag, name, buildContext string,
		gpuEnabled bool, g ir.Graph, timeout time.Duration, mountOptionsStr []string) (string, string, error)
	StartBuildkitd(ctx context.Context, tag, name string) (string, error)

	IsRunning(ctx context.Context, name string) (bool, error)
	IsCreated(ctx context.Context, name string) (bool, error)
	WaitUntilRunning(ctx context.Context, name string, timeout time.Duration) error

	Exec(ctx context.Context, cname string, cmd []string) error
	Destroy(ctx context.Context, name string) (string, error)

	ListContainer(ctx context.Context) ([]types.Container, error)
	GetContainer(ctx context.Context, cname string) (types.ContainerJSON, error)
	PauseContainer(ctx context.Context, name string) (string, error)
	ResumeContainer(ctx context.Context, name string) (string, error)

	ListImage(ctx context.Context) ([]types.ImageSummary, error)
	GetImage(ctx context.Context, image string) (types.ImageSummary, error)

	// GPUEnabled returns true if nvidia container runtime exists in docker daemon.
	GPUEnabled(ctx context.Context) (bool, error)
}

func NewClient

func NewClient(ctx context.Context) (Client, error)

Jump to

Keyboard shortcuts

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