docker

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package docker implements the runtime.Runtime interface using the Docker Engine API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Docker

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

Docker implements runtime.Runtime using the Docker Engine API.

func New

func New() (*Docker, error)

New creates a new Docker runtime client. It uses environment variables (DOCKER_HOST, etc.) and API version negotiation.

func (*Docker) Close

func (d *Docker) Close() error

Close cleans up the Docker client resources.

func (*Docker) ImageExists

func (d *Docker) ImageExists(ctx context.Context, imageRef string) bool

ImageExists reports whether the given image reference exists locally.

func (*Docker) InspectSelf

func (d *Docker) InspectSelf(ctx context.Context) (runtime.ContainerInfo, error)

InspectSelf returns the container configuration for the current container. It uses os.Hostname() to get the container ID (Docker sets HOSTNAME to the container short ID).

func (*Docker) Ping

func (d *Docker) Ping(ctx context.Context) error

Ping checks if the Docker daemon is responsive.

func (*Docker) PullImage

func (d *Docker) PullImage(ctx context.Context, imageRef string) error

PullImage pulls the given image reference from a registry.

func (*Docker) RunContainer

func (d *Docker) RunContainer(ctx context.Context, info runtime.ContainerInfo) error

RunContainer creates and starts a new container with the given configuration.

Jump to

Keyboard shortcuts

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