docker

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2017 License: Apache-2.0 Imports: 16 Imported by: 22

Documentation

Index

Constants

View Source
const (
	//DefaultURL docker default URL
	DefaultURL = "unix:///var/run/docker.sock"
	//DefaultVersion docker default version
	DefaultVersion = "1.27"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Docker

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

Docker wrapper

func NewClient

func NewClient(url string, version string) *Docker

NewClient instantiates a new Docker wrapper

func (*Docker) Connect

func (d *Docker) Connect() (err error)

Connect to the docker API

func (*Docker) ContainerCreate

func (d *Docker) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, name string) (*container.ContainerCreateCreatedBody, error)

ContainerCreate creates a container and pulls the image if needed

func (*Docker) GetClient

func (d *Docker) GetClient() *client.Client

GetClient returns the native docker client

func (*Docker) ImagePull added in v0.9.1

func (d *Docker) ImagePull(ctx context.Context, image string) error

ImagePull pulls a docker image

func (*Docker) NodeList added in v0.11.0

func (d *Docker) NodeList(ctx context.Context, options types.NodeListOptions) ([]swarm.Node, error)

NodeList list the nodes

func (*Docker) StackDeploy added in v0.9.1

func (d *Docker) StackDeploy(ctx context.Context, stackName string, composeFile []byte) (output string, err error)

StackDeploy deploy a stack

func (*Docker) StackList added in v0.9.1

func (d *Docker) StackList(ctx context.Context) (output string, err error)

StackList list the stacks

func (*Docker) StackRemove added in v0.9.1

func (d *Docker) StackRemove(ctx context.Context, stackName string) (output string, err error)

StackRemove remove a stack

func (*Docker) StackServices added in v0.11.0

func (d *Docker) StackServices(ctx context.Context, stackName string) (output string, err error)

StackServices list the services of a stack

func (*Docker) TaskList added in v0.10.0

func (d *Docker) TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error)

TaskList list the tasks

Directories

Path Synopsis
docker

Jump to

Keyboard shortcuts

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