dockerclient

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package dockerclient implements the stack engine's Docker seam against a real engine, using the maintained moby/moby client. It is a separate module so the Docker SDK never enters the control plane's dependency graph — the server satisfies the same interface with the client it already has.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

Engine is a docker.Client backed by a real Docker engine. Beyond the seam it also exposes Ping and Close, which a caller owning the connection needs but the engine itself never calls.

func New

func New() (*Engine, error)

New connects to the Docker engine using the standard environment (DOCKER_HOST etc.) with API version negotiation.

func (*Engine) Close

func (e *Engine) Close() error

Close releases the underlying HTTP transport.

func (*Engine) CreateVolume

func (e *Engine) CreateVolume(ctx context.Context, name string, labels map[string]string, sizeBytes int64) (docker.Volume, error)

func (*Engine) EnsureNetworkSpec

func (e *Engine) EnsureNetworkSpec(ctx context.Context, spec docker.NetworkSpec) (string, error)

func (*Engine) ImageExists

func (e *Engine) ImageExists(ctx context.Context, ref string) (bool, error)

func (*Engine) InspectContainer

func (e *Engine) InspectContainer(ctx context.Context, id string) (docker.Container, error)

func (*Engine) InspectContainerConfig

func (e *Engine) InspectContainerConfig(ctx context.Context, id string) (docker.ContainerConfig, error)

func (*Engine) InspectVolume

func (e *Engine) InspectVolume(ctx context.Context, name string) (docker.Volume, error)

func (*Engine) ListContainers

func (e *Engine) ListContainers(ctx context.Context, all bool) ([]docker.Container, error)

func (*Engine) NetworkConnect added in v0.12.0

func (e *Engine) NetworkConnect(ctx context.Context, name, containerID string, aliases []string) error

func (*Engine) NetworkDisconnect added in v0.12.0

func (e *Engine) NetworkDisconnect(ctx context.Context, name, containerID string, force bool) error

func (*Engine) Ping

func (e *Engine) Ping(ctx context.Context) error

Ping checks the daemon is reachable and responding.

func (*Engine) PullImage

func (e *Engine) PullImage(ctx context.Context, ref string, auth *docker.RegistryAuth) error

func (*Engine) RemoveContainer

func (e *Engine) RemoveContainer(ctx context.Context, id string, force bool) error

func (*Engine) RemoveVolume

func (e *Engine) RemoveVolume(ctx context.Context, name string, force bool) error

func (*Engine) RestartContainer

func (e *Engine) RestartContainer(ctx context.Context, id string, timeoutSeconds int) error

func (*Engine) RunContainer

func (e *Engine) RunContainer(ctx context.Context, spec docker.RunSpec) (string, error)

func (*Engine) RunOneShot

func (e *Engine) RunOneShot(ctx context.Context, spec docker.RunSpec) (int, string, error)

Jump to

Keyboard shortcuts

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