docker

package
v0.64.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateContainerOptions

type CreateContainerOptions struct {
	Image string
	Binds []string
}

CreateContainerOptions represents the options to the CreateContainer method.

type ExecOptions

type ExecOptions struct {
	ID           string
	Cmd          []string
	Env          map[string]string
	InputStream  io.Reader
	OutputStream io.Writer
	ErrorStream  io.Writer
	Tty          bool
	Interactive  bool
	WorkingDir   string
}

ExecOptions represents options to the Exec method.

type Iface

type Iface interface {
	Run(options *RunOptions) error
	EnsureImage(image string, outputStream io.Writer) error
	PullImage(image string, outputStream io.Writer) error
	GetImageRepoDigests(image string) ([]string, error)
	Exec(options *ExecOptions) error
	Stop(id string, timeout int) error
	CreateVolume(name string) (string, error)
	VolumeExists(name string) (bool, error)
	RemoveVolume(id string) error
	CreateContainer(options *CreateContainerOptions) (string, error)
	RemoveContainer(id string) error
	CopyFromContainer(id, path string) (io.ReadCloser, error)
	CopyToContainer(id, path string, reader io.Reader) error
	SetDebugVolume(volume string)
}

Iface is an interface for interracting with docker.

type RunOptions

type RunOptions struct {
	Image         string
	WorkingDir    string
	Entrypoint    []string
	Cmd           []string
	Env           []string
	Binds         []string
	NamePrefix    string
	InputStream   io.Reader
	OutputStream  io.Writer
	ErrorStream   io.Writer
	Started       chan string
	Init          bool
	SuccessStatus int
	BeforeRemove  func(id string) error
}

RunOptions represents the options to the Run method.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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