Documentation ¶
Index ¶
- func PolicyRoot() string
- type DockerClient
- func (dc *DockerClient) GetRunningTopazContainers() ([]*types.Container, error)
- func (dc *DockerClient) ImageExists(img string) bool
- func (dc *DockerClient) IsRunning(name string) (bool, error)
- func (dc *DockerClient) PullImage(img, platform string) error
- func (dc *DockerClient) RemoveImage(img string) error
- func (dc *DockerClient) Run(opts ...RunOption) error
- func (dc *DockerClient) Start(opts ...RunOption) error
- func (dc *DockerClient) Stop(name string) error
- type RunOption
- func WithAutoRemove() RunOption
- func WithCmd(cmds []string) RunOption
- func WithContainerHostname(hostname string) RunOption
- func WithContainerImage(img string) RunOption
- func WithContainerName(name string) RunOption
- func WithContainerPlatform(platform string) RunOption
- func WithEntrypoint(args []string) RunOption
- func WithEnv(env string) RunOption
- func WithEnvs(envs []string) RunOption
- func WithError(e io.Writer) RunOption
- func WithOutput(o io.Writer) RunOption
- func WithPort(port string) RunOption
- func WithPorts(ports []string) RunOption
- func WithVolume(volume string) RunOption
- func WithVolumes(volumes []string) RunOption
- func WithWorkingDir(wd string) RunOption
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 WithContainerHostname ¶ added in v0.31.5
func WithContainerImage ¶ added in v0.31.5
func WithContainerName ¶ added in v0.31.5
func WithContainerPlatform ¶ added in v0.31.5
func WithEntrypoint ¶ added in v0.31.5
func WithOutput ¶ added in v0.31.5
func WithVolume ¶ added in v0.31.5
func WithVolumes ¶ added in v0.31.5
func WithWorkingDir ¶ added in v0.31.5
Click to show internal directories.
Click to hide internal directories.