dockerx

package
v0.33.26 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: Apache-2.0 Imports: 17 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PolicyRoot

func PolicyRoot() string

Types

type DockerClient

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

func New

func New() (*DockerClient, error)

func (*DockerClient) GetRunningTopazContainers

func (dc *DockerClient) GetRunningTopazContainers() ([]container.Summary, error)

func (*DockerClient) ImageExists

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

ImageExists checks if image exists in local container store.

func (*DockerClient) IsRunning

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

IsRunning returns if container with `name` is running.

func (*DockerClient) PullImage

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

PullImage container image.

func (*DockerClient) RemoveImage

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

RemoveImage removes container image (image-name:tag) from the container store.

func (*DockerClient) Run

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

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

func (*DockerClient) Start

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

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

func (*DockerClient) Stop

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

Stop container instance with `name`.

type RunOption

type RunOption func(*runner)

func WithAutoRemove

func WithAutoRemove() RunOption

WithAutoRemove, automatically remove container when it exits.

func WithCmd

func WithCmd(cmds []string) RunOption

func WithContainerHostname

func WithContainerHostname(hostname string) RunOption

func WithContainerImage

func WithContainerImage(img string) RunOption

func WithContainerName

func WithContainerName(name string) RunOption

func WithContainerPlatform

func WithContainerPlatform(platform string) RunOption

func WithEntrypoint

func WithEntrypoint(args []string) RunOption

func WithEnv

func WithEnv(env string) RunOption

func WithEnvs

func WithEnvs(envs []string) RunOption

func WithError

func WithError(e io.Writer) RunOption

func WithOutput

func WithOutput(o io.Writer) RunOption

func WithPort

func WithPort(port string) RunOption

func WithPorts

func WithPorts(ports []string) RunOption

func WithVolume

func WithVolume(volume string) RunOption

func WithVolumes

func WithVolumes(volumes []string) RunOption

func WithWorkingDir

func WithWorkingDir(wd string) RunOption

Jump to

Keyboard shortcuts

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