docker

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

README

docker

The client to interact with the docker daemon

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
}

Client ...

func NewClient

func NewClient() *Client

NewClient ...

func (*Client) ContainerExec

func (s *Client) ContainerExec(containerID string, cmd []string) (io.Reader, error)

ContainerExec ...

func (*Client) CopyFromContainer

func (s *Client) CopyFromContainer(containerID, srcpath string) (io.ReadCloser, error)

CopyFromContainer ...

func (*Client) CopyToContainer

func (s *Client) CopyToContainer(containerID, dstpath string, data io.Reader) error

CopyToContainer ...

func (*Client) CreateContainer

func (s *Client) CreateContainer(imageID string, cmd []string, config *CreateContainerConfig) (string, error)

CreateContainer ...

func (*Client) HasImage

func (s *Client) HasImage(imageID string) (bool, error)

HasImage ...

func (*Client) InspectContainer

func (s *Client) InspectContainer(containerID string) (types.ContainerJSON, error)

InspectContainer ...

func (*Client) ListImages

func (s *Client) ListImages() ([]*ImageSummary, error)

ListImages ...

func (*Client) LoadImage

func (s *Client) LoadImage(input io.Reader) error

LoadImage ...

func (*Client) LoadImageByFilepath

func (s *Client) LoadImageByFilepath(filepath string) error

LoadImageByFilepath ...

func (*Client) PullImage

func (s *Client) PullImage(imageID string) error

PullImage ...

func (*Client) PushImage

func (s *Client) PushImage(imageID string) error

PushImage ...

func (*Client) ReadImage

func (s *Client) ReadImage(imageID string) (io.Reader, error)

ReadImage ...

func (*Client) RemoveAllImages

func (s *Client) RemoveAllImages() error

RemoveAllImages ...

func (*Client) RemoveImage

func (s *Client) RemoveImage(imageID string) error

RemoveImage ...

func (*Client) StartContainer

func (s *Client) StartContainer(containerID string) error

StartContainer ...

func (*Client) StopContainer

func (s *Client) StopContainer(containerID string) error

StopContainer ...

func (*Client) TagImage

func (s *Client) TagImage(imageID, tag string) error

TagImage ...

type CreateContainerConfig

type CreateContainerConfig struct {
	// container:host
	Volumes map[string]string
	Ports   map[string]string
}

CreateContainerConfig ...

type ImageSummary

type ImageSummary struct {
	ID   string
	Tags []string
	Size int64
}

ImageSummary ....

type Interface

type Interface interface {
	ListImages() ([]*ImageSummary, error)
	HasImage(imageID string) (bool, error)
	TagImage(imageID, tag string) error
	PullImage(imageID string) error
	PushImage(imageID string) error
	RemoveImage(imageID string) error
	RemoveAllImages() error
	CreateContainer(imageID string, cmd []string, config *CreateContainerConfig) (string, error)
	StartContainer(containerID string) error
	StopContainer(containerID string) error
	InspectContainer(containerID string) (types.ContainerJSON, error)
	ContainerExec(containerID string, cmd []string) (io.Reader, error)
	ReadImage(imageID string) (io.Reader, error)
	LoadImage(input io.Reader) error
	LoadImageByFilepath(filepath string) error
	CopyToContainer(containerID, dirpath string, data io.Reader) error
	CopyFromContainer(containerID, srcpath string) (io.ReadCloser, error)
}

Interface ...

Directories

Path Synopsis
Package mock_docker is a generated GoMock package.
Package mock_docker is a generated GoMock package.

Jump to

Keyboard shortcuts

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