docker

package
v0.0.0-...-fecfafd Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	Username string
	Password string
}

type DockerClient

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

func NewClient

func NewClient() (*DockerClient, error)

func (*DockerClient) CreateContainer

func (d *DockerClient) CreateContainer(ctx context.Context,
	config *container.Config,
	hostConfig *container.HostConfig,
	networkingConfig *network.NetworkingConfig,
	containerName string) (container.CreateResponse, error)

func (*DockerClient) ExecuteContainerCommand

func (d *DockerClient) ExecuteContainerCommand(ctx context.Context, containerID string, command []string) (types.IDResponse, error)

func (*DockerClient) GetContainerLogs

func (d *DockerClient) GetContainerLogs(ctx context.Context, containerID string) (io.ReadCloser, error)

func (*DockerClient) HealthCheck

func (d *DockerClient) HealthCheck(ctx context.Context, containerID string) (types.ContainerState, error)

func (*DockerClient) ImageExists

func (d *DockerClient) ImageExists(ctx context.Context, imageName string) (bool, error)

func (*DockerClient) ListContainers

func (d *DockerClient) ListContainers(ctx context.Context) ([]types.Container, error)

func (*DockerClient) ListImages

func (d *DockerClient) ListImages(ctx context.Context) ([]image.Summary, error)

func (*DockerClient) PullImageFromPrivateRegistry

func (d *DockerClient) PullImageFromPrivateRegistry(ctx context.Context, fullImageName, username, password string) error

PullImageFromPrivateRegistry pulls an image from a private registry but not if the exact image exits locally

func (*DockerClient) RemoveContainer

func (d *DockerClient) RemoveContainer(ctx context.Context, containerID string, options container.RemoveOptions) error

func (*DockerClient) RemoveImage

func (d *DockerClient) RemoveImage(ctx context.Context, imageName string) error

func (*DockerClient) RestartContainer

func (d *DockerClient) RestartContainer(ctx context.Context, containerID string, timeout *int) error

func (*DockerClient) StartContainer

func (d *DockerClient) StartContainer(ctx context.Context, containerID string) error

func (*DockerClient) StopContainer

func (d *DockerClient) StopContainer(ctx context.Context, containerID string, timeout *int) error

type PullOptions

type PullOptions struct {
	RegistryAuth string
}

Jump to

Keyboard shortcuts

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