docker

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultURL     = "unix:///var/run/docker.sock"
	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) PullImage

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

PullImage pulls a docker image

Directories

Path Synopsis
docker

Jump to

Keyboard shortcuts

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