docker

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient() (*Client, error)

func (*Client) BuildImage

func (c *Client) BuildImage(ctx context.Context, buildContext io.Reader, tag string, output io.Writer) error

func (*Client) Close

func (c *Client) Close() error

func (*Client) CreateNetwork

func (c *Client) CreateNetwork(
	ctx context.Context,
	name string,
	driver string,
) (string, error)

func (*Client) ExecCommand

func (c *Client) ExecCommand(ctx context.Context, name string, cmd string) (string, error)

func (*Client) GetContainerLogs

func (c *Client) GetContainerLogs(ctx context.Context, name string, tail int) (string, error)

func (*Client) InspectContainer

func (c *Client) InspectContainer(ctx context.Context, name string) (string, error)

func (*Client) ListContainers

func (c *Client) ListContainers(ctx context.Context, all bool) ([]Container, error)

func (*Client) ListImages

func (c *Client) ListImages(ctx context.Context) ([]Image, error)

func (*Client) ListNetworks

func (c *Client) ListNetworks(ctx context.Context) ([]Network, error)

func (*Client) ListVolumes

func (c *Client) ListVolumes(ctx context.Context) ([]Volume, error)

func (*Client) Ping

func (c *Client) Ping(ctx context.Context) error

func (*Client) PullImage

func (c *Client) PullImage(ctx context.Context, imageName string) (int64, error)

func (*Client) RemoveContainer

func (c *Client) RemoveContainer(ctx context.Context, name string, force bool) error

func (*Client) RemoveImage

func (c *Client) RemoveImage(ctx context.Context, imageID string, force bool) error

func (*Client) RunContainer

func (c *Client) RunContainer(ctx context.Context, image string, name string, ports []string, env map[string]string, volumes []string, restart string, detach bool) (string, error)

func (*Client) StartContainer

func (c *Client) StartContainer(ctx context.Context, containerID string) error

func (*Client) StopContainer

func (c *Client) StopContainer(ctx context.Context, name string) error

type Container

type Container struct {
	ID      string   `json:"id"`
	Name    string   `json:"name"`
	Image   string   `json:"image"`
	Status  string   `json:"status"`
	Ports   []string `json:"ports"`
	Created int64    `json:"created"`
}

type Image

type Image struct {
	ID         string `json:"id"`
	Repository string `json:"repository"`
	Tag        string `json:"tag"`
	Size       int64  `json:"size"`
	Created    int64  `json:"created"`
}

type Network

type Network struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Driver string `json:"driver"`
	Scope  string `json:"scope"`
}

type Volume

type Volume struct {
	Name       string `json:"name"`
	Driver     string `json:"driver"`
	Scope      string `json:"scope"`
	Mountpoint string `json:"mountpoint"`
}

Jump to

Keyboard shortcuts

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