docker

package
v0.0.0-...-ebe00c9 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerApiClient

type DockerApiClient interface {
	docker.ContainerAPIClient
	docker.ImageAPIClient
	HTTPClient() *http.Client
}

type DockerClient

type DockerClient struct {
	DockerApi DockerApiClient
}

func Client

func Client() (*DockerClient, error)

func ClientFromConfig

func ClientFromConfig(config DockerClientConfig) (*DockerClient, error)

func (DockerClient) ContainerCreate

func (client DockerClient) ContainerCreate(ctx context.Context, imageName, containerName string) (string, error)

ContainerCreate - create a container given an image name

func (DockerClient) ContainerGetByID

func (client DockerClient) ContainerGetByID(ctx context.Context, id string) (*dockerTypes.Container, error)

ContainerGetByID - return a container instance for a given id

func (DockerClient) ContainerGetByName

func (client DockerClient) ContainerGetByName(ctx context.Context, name string) (*dockerTypes.Container, error)

ContainerGetByName - return a container instance for a given name

func (DockerClient) ContainerList

func (client DockerClient) ContainerList(ctx context.Context) ([]dockerTypes.Container, error)

ContainerList - returns a list of all running containers

func (DockerClient) ContainerRemove

func (client DockerClient) ContainerRemove(ctx context.Context, id string) error

func (DockerClient) ImageDelete

func (client DockerClient) ImageDelete(ctx context.Context, imageName string) error

func (DockerClient) ImageExists

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

func (DockerClient) ImageFind

func (client DockerClient) ImageFind(ctx context.Context, imageName string) (id *string, err error)

func (DockerClient) ImagePull

func (client DockerClient) ImagePull(ctx context.Context, imageName string) error

type DockerClientConfig

type DockerClientConfig struct {
	Version string
}

Jump to

Keyboard shortcuts

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