docker

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: GPL-2.0 Imports: 13 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 {
	// RunContainer creates and starts a container with the given config.
	// The specified image will be pulled automatically if it does not exist.
	RunContainer(ctx context.Context, config RunContainerConfig) (id string, err error)
	WaitContainerWithTimeout(id string, timeout time.Duration) (int, error)
	RemoveContainerWithTimeout(id string, timeout time.Duration) error
	ListContainersWithTimeout(running bool, timeout time.Duration) ([]ContainerSummary, error)
	UpgradeImages(refs []string) error
}

func NewClient

func NewClient(endpoint string) (Client, error)

type ContainerSummary

type ContainerSummary struct {
	ID     string
	Labels map[string]string
}

type RunContainerConfig

type RunContainerConfig struct {
	// ContainerConfig
	Labels map[string]string
	Env    []string
	Image  string
	Name   string

	// HostConfig
	Binds []string

	// NetworkingConfig
	Network string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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