docker

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2025 License: Zlib Imports: 18 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 {
	PullImage(ctx context.Context, image string) error
	BuildImage(ctx context.Context, dockerfilePath string, tag string) error
	CreateNetwork(ctx context.Context, networkName string) error
	RemoveNetwork(ctx context.Context, networkName string) error
	RunContainer(ctx context.Context, opts RunOptions) error
	CopyToContainer(ctx context.Context, containerID string, srcPath string, dstPath string) error
	StartContainer(ctx context.Context, containerID string, stdout io.Writer, stderr io.Writer) error
	StopContainer(ctx context.Context, containerID string) error
	RemoveContainer(ctx context.Context, containerID string) error
	Close() error
}

func NewClient

func NewClient() (Client, error)

type RunOptions

type RunOptions struct {
	Image       string
	Name        string
	Commands    []string
	Environment map[string]string
	WorkingDir  string
	NetworkName string
	Volumes     map[string]string
	Stdout      io.Writer
	Stderr      io.Writer
	CreateOnly  bool
}

Jump to

Keyboard shortcuts

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