dockerx

package
v0.32.33 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PolicyRoot added in v0.30.24

func PolicyRoot() string

Types

type DockerClient added in v0.31.5

type DockerClient struct {
	// contains filtered or unexported fields
}

func New added in v0.31.5

func New() (*DockerClient, error)

func (*DockerClient) GetRunningTopazContainers added in v0.32.0

func (dc *DockerClient) GetRunningTopazContainers() ([]*types.Container, error)

func (*DockerClient) ImageExists added in v0.31.8

func (dc *DockerClient) ImageExists(img string) bool

Check if image exists in local container store.

func (*DockerClient) IsRunning added in v0.31.5

func (dc *DockerClient) IsRunning(name string) (bool, error)

IsRunning returns if container with `name` is running.

func (*DockerClient) PullImage added in v0.31.8

func (dc *DockerClient) PullImage(img, platform string) error

PullImage container image.

func (*DockerClient) RemoveImage added in v0.31.5

func (dc *DockerClient) RemoveImage(img string) error

Remove container image as image-name:tag.

func (*DockerClient) Run added in v0.31.5

func (dc *DockerClient) Run(opts ...RunOption) error

Run starts a container like `docker run` using the provided settings.

func (*DockerClient) Start added in v0.31.5

func (dc *DockerClient) Start(opts ...RunOption) error

Starts starts a container like `docker start` using the provided settings.

func (*DockerClient) Stop added in v0.31.5

func (dc *DockerClient) Stop(name string) error

Stop container instance with `name`.

type RunOption added in v0.31.5

type RunOption func(*runner)

func WithAutoRemove added in v0.31.5

func WithAutoRemove() RunOption

WithAutoRemove, automatically remove container when it exits.

func WithCmd added in v0.31.5

func WithCmd(cmds []string) RunOption

func WithContainerHostname added in v0.31.5

func WithContainerHostname(hostname string) RunOption

func WithContainerImage added in v0.31.5

func WithContainerImage(img string) RunOption

func WithContainerName added in v0.31.5

func WithContainerName(name string) RunOption

func WithContainerPlatform added in v0.31.5

func WithContainerPlatform(platform string) RunOption

func WithEntrypoint added in v0.31.5

func WithEntrypoint(args []string) RunOption

func WithEnv added in v0.31.5

func WithEnv(env string) RunOption

func WithEnvs added in v0.31.5

func WithEnvs(envs []string) RunOption

func WithError added in v0.31.5

func WithError(e io.Writer) RunOption

func WithOutput added in v0.31.5

func WithOutput(o io.Writer) RunOption

func WithPort added in v0.31.5

func WithPort(port string) RunOption

func WithPorts added in v0.31.5

func WithPorts(ports []string) RunOption

func WithVolume added in v0.31.5

func WithVolume(volume string) RunOption

func WithVolumes added in v0.31.5

func WithVolumes(volumes []string) RunOption

func WithWorkingDir added in v0.31.5

func WithWorkingDir(wd string) RunOption

Jump to

Keyboard shortcuts

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