Documentation ¶
Index ¶
- Variables
- func Connect() error
- func ContainerExec(id string, command []string) (resp types.ContainerExecInspect, err error)
- func CreateNetwork(s string) (id string, err error)
- func Images() ([]types.ImageSummary, error)
- func IsDockerRunning() bool
- func IsImagePulled(image string) (status bool, err error)
- func NetworkByID(s string) (types.NetworkResource, error)
- func NetworkByName(s string) (types.NetworkResource, error)
- func PullImage(image string, pull bool) (err error)
- func RemoveImage(image string) (err error)
- func RunContainer(config *container.Config, hostConfig *container.HostConfig) (container.ContainerCreateCreatedBody, error)
- func StartDocker() error
- type CLI
- func (c *CLI) Connect() (err error)
- func (c *CLI) ContainerExec(id string, command []string) (resp types.ContainerExecInspect, err error)
- func (c *CLI) CreateNetwork(name string) (id string, err error)
- func (c *CLI) DockerAPIversion() (version string)
- func (c *CLI) Images() ([]types.ImageSummary, error)
- func (c *CLI) IsDockerRunning() bool
- func (c *CLI) IsImagePulled(image string) (status bool, err error)
- func (c *CLI) NetworkByID(id string) (network types.NetworkResource, err error)
- func (c *CLI) NetworkByName(name string) (network types.NetworkResource, err error)
- func (c *CLI) PullImage(image string, pull bool) (err error)
- func (c *CLI) RemoveImage(image string) (err error)
- func (c *CLI) RunContainer(config *container.Config, hostConfig *container.HostConfig) (container container.ContainerCreateCreatedBody, err error)
- func (c *CLI) StartDocker() error
- type Client
- type DockerContainer
- type DockerImage
- type DockerNetwork
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDockerTimeout = errors.New("Timed out waiting for docker to start") ErrCouldntStartDocker = errors.New("Couldn't start docker daemon. Try starting it manually") )
View Source
var DefaultClient = New()
A default client the is already connected to Docker
Functions ¶
func ContainerExec ¶
func ContainerExec(id string, command []string) (resp types.ContainerExecInspect, err error)
func CreateNetwork ¶
func Images ¶
func Images() ([]types.ImageSummary, error)
func IsDockerRunning ¶
func IsDockerRunning() bool
func IsImagePulled ¶
func NetworkByID ¶
func NetworkByID(s string) (types.NetworkResource, error)
func RemoveImage ¶
func RunContainer ¶
func RunContainer(config *container.Config, hostConfig *container.HostConfig) (container.ContainerCreateCreatedBody, error)
RunContainer creates and starts a container with given options
func StartDocker ¶
func StartDocker() error
Types ¶
type CLI ¶
func (*CLI) ContainerExec ¶
func (*CLI) DockerAPIversion ¶
func (*CLI) IsDockerRunning ¶
func (*CLI) NetworkByID ¶
func (c *CLI) NetworkByID(id string) (network types.NetworkResource, err error)
func (*CLI) NetworkByName ¶
func (c *CLI) NetworkByName(name string) (network types.NetworkResource, err error)
func (*CLI) RemoveImage ¶
func (*CLI) RunContainer ¶
func (c *CLI) RunContainer(config *container.Config, hostConfig *container.HostConfig) (container container.ContainerCreateCreatedBody, err error)
func (*CLI) StartDocker ¶
type Client ¶
type Client interface { Connect() (err error) IsDockerRunning() bool StartDocker() error // Network methods DockerNetwork // Image methods DockerImage // Container methods DockerContainer // contains filtered or unexported methods }
type DockerContainer ¶
type DockerContainer interface { RunContainer(config *container.Config, hostConfig *container.HostConfig) (container.ContainerCreateCreatedBody, error) ContainerExec(id string, command []string) (resp types.ContainerExecInspect, err error) }
type DockerImage ¶
type DockerNetwork ¶
Click to show internal directories.
Click to hide internal directories.