docker

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2017 License: Apache-2.0 Imports: 14 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) DoesServiceExist

func (d *Docker) DoesServiceExist(ctx context.Context, name string) bool

DoesServiceExist returns whether the given service exists

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) StackDeploy added in v0.9.1

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

func (*Docker) StackList added in v0.9.1

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

func (*Docker) StackRemove added in v0.9.1

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

Directories

Path Synopsis
docker

Jump to

Keyboard shortcuts

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